Sidvind
sidvind
https://sidvind.com/wiki/Main_Page
MediaWiki 1.25.1
first-letter
Media
Special
Talk
User
User talk
Sidvind
Sidvind talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
2D-Collision response
0
1404
2483
2300
2010-12-29T17:33:31Z
EXt
1
wikitext
text/x-wiki
== Description ==
This article covers what to do when we know a collision has occured using what is usually called the ''impulse method''. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
=== Static objects ===
If one of the objects colliding is static (as in inmovable) suppose it has infinitive mass. As the mass goes towards infinity <math>\tfrac{1}{M}</math> goes towards zero. Thus it is possible to simplify equation 2 to <math>j = \frac{(1+e)\mathbf{v}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M})}</math>.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Moment of Inertia ==
The moment of inertia, I, is a measure of how difficult it is to change the rotational velocity (i.e. spin) of an object. It is analogous to the inertia that mass provides in Newton's 2nd Law: F = ma (using MoI: τ = Iω, where τ is the torque and ω is the angular velocity)
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
=== Sphere (Solid) ===
Many game objects should be represented as solid spheres, even though they appear on the screen as circular objects (2d projection of a sphere).
<math>I = \frac{2}{5}mr^2</math>
[[Category: Math]]
[[Category: Physics]]
b0b2f16b372fa19c90075fe6f57825293e20d25f
2300
2266
2009-01-06T17:53:14Z
GrimFang4
61
/* Inertia */ Added explanation and spherical moment of inertia.
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured using what is usually called the ''impulse method''. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
=== Static objects ===
If one of the objects colliding is static (as in inmovable) suppose it has infinitive mass. As the mass goes towards infinity <math>\tfrac{1}{M}</math> goes towards zero. Thus it is possible to simplify equation 2 to <math>j = \frac{(1+e)\mathbf{v}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M})}</math>.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Moment of Inertia ==
The moment of inertia, I, is a measure of how difficult it is to change the rotational velocity (i.e. spin) of an object. It is analogous to the inertia that mass provides in Newton's 2nd Law: F = ma (using MoI: τ = Iω, where τ is the torque and ω is the angular velocity)
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
=== Sphere (Solid) ===
Many game objects should be represented as solid spheres, even though they appear on the screen as circular objects (2d projection of a sphere).
<math>I = \frac{2}{5}mr^2</math>
[[Category: Math]]
[[Category: Physics]]
11fb6cfc364713a5f36e3113038aaeb0c71e7413
2266
2165
2008-06-30T16:23:17Z
EXt
1
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured using what is usually called the ''impulse method''. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
=== Static objects ===
If one of the objects colliding is static (as in inmovable) suppose it has infinitive mass. As the mass goes towards infinity <math>\tfrac{1}{M}</math> goes towards zero. Thus it is possible to simplify equation 2 to <math>j = \frac{(1+e)\mathbf{v}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M})}</math>.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
6e8031e527b332211eac490b68e5ce3005a55724
2165
2159
2008-01-07T13:53:55Z
EXt
1
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured using what is usually called the ''impulse method''. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
=== Static objects ===
If one of the objects colliding is static (as in inmovable) suppose it as infinitive mass. As the mass goes towards infinity <math>\tfrac{1}{M}</math> goes towards zero. Thus it is possible to simplify equation 2 to <math>j = \frac{(1+e)\mathbf{v}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M})}</math>.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
95546a6829671355a8592cf2185448f64e7faa80
2159
2158
2007-12-12T19:08:13Z
EXt
1
Static objects
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
=== Static objects ===
If one of the objects colliding is static (as in inmovable) suppose it as infinitive mass. As the mass goes towards infinity <math>\tfrac{1}{M}</math> goes towards zero. Thus it is possible to simplify equation 2 to <math>j = \frac{(1+e)\mathbf{v}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M})}</math>.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
e39e187252361c3f8b7be9e663df64f32086fb62
2158
2157
2007-12-12T18:42:21Z
EXt
1
Explained collisions with rotation
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
where
* A and B is used to refer to each object
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity for each object.
* <math>\mathbf{\omega}</math> is the angeluar velocity for each object.
* <math>\mathbf{v}^{P}</math> is the velocity in the collision point for each object. Remember that the velocity in a point of the object is '''not''' equal to the velocity of the object!
* <math>\mathbf{r}_\bot^{P}</math> is the tangent of the point of collision for each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass for each object.
* <math>I</math> is the inertia. See below for calculation.
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
a28e3300e4613c2b0844f586f8398552cee36cec
2157
2078
2007-12-12T18:23:25Z
EXt
1
Explained collisions without rotations
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
where
* <math>e</math> is the bounciness.
* <math>\mathbf{v}</math> is the velocity of each object.
* <math>\mathbf{v}^{AB}</math> is the relative velocity of the objects colliding.
* <math>\mathbf{n}</math> is the collision normal, usually perpendicular to one of the polygons.
* <math>M</math> is the mass of each object.
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
b8613835ab293a760e26b7295900999411e69d35
2078
2005
2006-09-28T18:54:47Z
EXt
1
Added categories
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
[[Category: Math]]
[[Category: Physics]]
ef27e1aee6ed0cfe5917c9552ec6a2ea427edb38
2005
2003
2006-08-02T19:33:04Z
EXt
1
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
The math shown here might look complex to some but we will explain all of it.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
== Inertia ==
=== Rectangle ===
<math>I = \frac{1}{12}m(a^2+b^2)</math>
Where a and b is the width and height of the rectangle.
=== Circle ===
<math>I = \frac{1}{2}mr^2</math>
Where r is the radius of the circle.
ebc948febbbba43efda3a45af2a8564e3e3343d8
2003
2002
2006-08-01T23:01:25Z
EXt
1
wikitext
text/x-wiki
''NOTE: This article is work in progress!''
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
== With rotation ==
Eq 1: <math>\mathbf{v}_1^{AP} = \mathbf{v}_1^A + \mathbf{\omega}_1^A\mathbf{r}_\bot^{AP}</math>
Eq 2a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 2b: <math>\mathbf{\omega}_2^A = \mathbf{\omega}_1^A + \frac{r_\bot^{AP}\cdot j\mathbf{n}}{I^A}</math>
Eq 3: <math>j = \frac{ -(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n} }{ \mathbf{n}\cdot\mathbf{n}( \frac{1}{M^A}+\frac{1}{M^B}) + \frac{(\mathbf{r}_\bot^{AP}\cdot\mathbf{n})^2}{I^A} + \frac{(\mathbf{r}_\bot^{BP}\cdot\mathbf{n})^2}{I^B} } </math>
d3137fdafb7943e2e1407c3a658e398dbb0dd2c4
2002
2006-08-01T21:48:18Z
EXt
1
wikitext
text/x-wiki
== Description ==
This article covers what to do when we know a collision has occured. It assumes you have some kind of [[Point-in-polygon: Jordan Curve Theorem|collision detection]] and that it supplies you with some data about the collision. First we need to know which object that collided and where. The relative velocity of the objects is also necessary. In order to determine the direction the objects will "fly" away we must know the normal of the collision. This is usually the normal of the edge that we collide with. When we know this we are ready to handle the collision.
== Without rotation ==
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
== With rotation ==
7e60d2216cb4d0f8acbe05622bb53510b42e17d3
Ansible
0
1836
3055
3054
2016-05-07T13:45:21Z
EXt
1
wikitext
text/x-wiki
== Combine with_items with undefined variable ==
Pre-ansible 2 it was possible to use
- name: example task
when: foo is defined
with_items: foo
..
However since 2.0 this yields a deprecation warning:
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('<nowiki>{{foo}}</nowiki>').
This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Surrounding the variable with quotes yields another:
[DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.: 'foo' is undefined.
This feature will be removed in a future release. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
This is because "when" is evaluated for each with_item iteration thus "foo" is accessed before the condition happens. The proper way to fix this is to use <code>| default([])</code>:
- name: example task
with_items: "<nowiki>{{ foo | default([]) }}</nowiki>"
..
[[Category:Ansible]]
24a8851424ed87e77043ec51ab055e68ade18a14
3054
2016-05-07T13:36:42Z
EXt
1
Created page with " [[Category:Ansible]]"
wikitext
text/x-wiki
[[Category:Ansible]]
e897b724a408c1018e49a2742002b0e7d0682caa
Boost::Python: Converting to and from custom class pointers
0
1427
2460
2118
2010-12-27T12:10:13Z
EXt
1
proper codebox
wikitext
text/x-wiki
{{Boost::Python}}
'''NOTE: Sadly this code isn't working 100% correctly, I have a new versions which I will add here soon'''
<codebox title="Converting your custom class to a python usable class">
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
void* extract_CustomString(PyObject* op){
return CustomString::stringWithCString(PyString_AsString(op));
}
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
boost::python::converter::registry::insert(&extract_CustomString, boost::python::type_id<CustomString>());
}
</codebox>
With this code we can convert to and from a custom string class. In python we use the regular strings and in C++ we can use our custom string class. This would work with any class of course.
ecb35083fde710643f9986ed53a35063ada3efb8
2118
2112
2007-02-19T01:13:58Z
EXt
1
wikitext
text/x-wiki
{{Boost::Python}}
'''NOTE: Sadly this code isn't working 100% correctly, I have a new versions which I will add here soon'''
{{Box code|Converting your custom class to a python usable class|
<code><cpp/>
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
void* extract_CustomString(PyObject* op){
return CustomString::stringWithCString(PyString_AsString(op));
}
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
boost::python::converter::registry::insert(&extract_CustomString, boost::python::type_id<CustomString>());
}
</code>
}}
With this code we can convert to and from a custom string class. In python we use the regular strings and in C++ we can use our custom string class. This would work with any class of course.
e916e23a2f49ffecd77705522b552228b01c0613
2112
2109
2007-02-06T13:46:26Z
EXt
1
wikitext
text/x-wiki
{{Box code|Converting your custom class to a python usable class|
<code><cpp/>
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
void* extract_CustomString(PyObject* op){
return CustomString::stringWithCString(PyString_AsString(op));
}
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
boost::python::converter::registry::insert(&extract_CustomString, boost::python::type_id<CustomString>());
}
</code>
}}
With this code we can convert to and from a custom string class. In python we use the regular strings and in C++ we can use our custom string class. This would work with any class of course.
1cc3e60786750b1a53d6624d1f68f2ca75270501
2109
2107
2007-02-06T13:11:25Z
EXt
1
[[Boost::Python: Converting to and from custom classe pointers]] moved to [[Boost::Python: Converting to and from custom class pointers]]
wikitext
text/x-wiki
== Custom class pointers to python ==
{{Box code|Converting your custom class to a python usable class|
<code><cpp/>
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr
: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
}
</code>
}}
This allows C/C++ functions to return pointers to custom classes and use them in python. In this example we use a custom string class. Since we already have strings in python it would be bad to expose your own. Another example would be if you have a custom array class in C++ which you would like to convert to a list in python. Using this code it is possible.
5dd97ce8a5833cec08722f8c5355c68de7cb9383
2107
2106
2007-02-06T13:11:00Z
EXt
1
[[Boost::Python: Converting to and from custom classes]] moved to [[Boost::Python: Converting to and from custom classe pointers]]
wikitext
text/x-wiki
== Custom class pointers to python ==
{{Box code|Converting your custom class to a python usable class|
<code><cpp/>
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr
: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
}
</code>
}}
This allows C/C++ functions to return pointers to custom classes and use them in python. In this example we use a custom string class. Since we already have strings in python it would be bad to expose your own. Another example would be if you have a custom array class in C++ which you would like to convert to a list in python. Using this code it is possible.
5dd97ce8a5833cec08722f8c5355c68de7cb9383
2106
2007-02-06T13:10:48Z
EXt
1
wikitext
text/x-wiki
== Custom class pointers to python ==
{{Box code|Converting your custom class to a python usable class|
<code><cpp/>
CustomString* factory(const char* str){
return new CustomString(str);
}
struct CustomString_to_PyStr
: to_python_converter<CustomString*, CustomString_to_PyStr> {
static PyObject* convert(CustomString* x) {
return PyString_FromString(x->c_str());
}
};
BOOST_PYTHON_MODULE(Foo){
CustomString_to_PyStr();
}
</code>
}}
This allows C/C++ functions to return pointers to custom classes and use them in python. In this example we use a custom string class. Since we already have strings in python it would be bad to expose your own. Another example would be if you have a custom array class in C++ which you would like to convert to a list in python. Using this code it is possible.
5dd97ce8a5833cec08722f8c5355c68de7cb9383
Boost::Python: Converting to and from custom classe pointers
0
1429
2110
2007-02-06T13:11:25Z
EXt
1
[[Boost::Python: Converting to and from custom classe pointers]] moved to [[Boost::Python: Converting to and from custom class pointers]]
wikitext
text/x-wiki
#REDIRECT [[Boost::Python: Converting to and from custom class pointers]]
58a43ae1f4960a00d3956bf443b6dc2b6ca6b445
Boost::Python: Converting to and from custom classes
0
1428
2108
2007-02-06T13:11:00Z
EXt
1
[[Boost::Python: Converting to and from custom classes]] moved to [[Boost::Python: Converting to and from custom classe pointers]]
wikitext
text/x-wiki
#REDIRECT [[Boost::Python: Converting to and from custom classe pointers]]
4161efb58d7f236908aac7fc76b28fe45b648801
Boost::Python: Dictionary
0
1425
2482
2134
2010-12-29T17:33:03Z
EXt
1
proper codebox
wikitext
text/x-wiki
{{Boost::Python}}
== Importing ==
<codebox title="Import a dictionary into C++">
object main_module = import("__main__");
object main_namespace = main_module.attr("__dict__");
</codebox>
== Exporting ==
<codebox title="Export a dictionary from C++">
boost::python::dict createDict(){
boost::python::dict d;
d["foo"] = 3.5f;
d["bar"] = 2.7f;
return d;
}
</codebox>
5303a5c340ffa8df412a3ce6429f8d022116a812
2134
2117
2007-11-13T09:15:13Z
80.25.252.55
0
/* Importing */
wikitext
text/x-wiki
{{Boost::Python}}
== Importing ==
{{Box code|Import a dictionary into C++|
<code><cpp/>
object main_module = import("__main__");
object main_namespace = main_module.attr("__dict__");
</code>
}}
== Exporting ==
{{Box code|Export a dictionary from C++|
<code><cpp/>
boost::python::dict createDict(){
boost::python::dict d;
d["foo"] = 3.5f;
d["bar"] = 2.7f;
return d;
}
</code>
}}
5dca60051959e5975d5afcfea79efe80d6e5f310
2117
2102
2007-02-19T01:12:52Z
EXt
1
wikitext
text/x-wiki
{{Boost::Python}}
== Importing ==
{{Box code|Import a dictionary into C++|
<code><cpp/>
</code>
}}
== Exporting ==
{{Box code|Export a dictionary from C++|
<code><cpp/>
boost::python::dict createDict(){
boost::python::dict d;
d["foo"] = 3.5f;
d["bar"] = 2.7f;
return d;
}
</code>
}}
223960a02dc0dbbacb5e7426dc54ae29fc25d34b
2102
2007-01-13T23:09:36Z
EXt
1
wikitext
text/x-wiki
== Importing ==
{{Box code|Import a dictionary into C++|
<code><cpp/>
</code>
}}
== Exporting ==
{{Box code|Export a dictionary from C++|
<code><cpp/>
boost::python::dict createDict(){
boost::python::dict d;
d["foo"] = 3.5f;
d["bar"] = 2.7f;
return d;
}
</code>
}}
bcb9b194b14872b83ebb15497334803f13a52e06
Boost::Python: List
0
1426
2472
2402
2010-12-29T15:46:09Z
EXt
1
proper codebox
wikitext
text/x-wiki
{{Boost::Python}}
Converting to and from a python lists is easy. If you are after a quick and dirty way see the page about [[Boost::Python:_Converting_to_and_from_custom_class_pointers|pointer conversion]].
This is faster but requires more work since you might need to provide a wrapper for your functions. If you just need the function to be used by python this is the better way. Same goes for returning lists.
== Importing ==
<codebox title="Import a list into C++">
void getList(boost::python::list* list){
int n = boost::python::extract<int>(list->attr("__len__")());
for ( int i = 0; i < n; i++ ){
int val = (boost::python::extract<int>((*list)[i]));
}
}
</codebox>
I think the code basicly explains itself. First we get the number of elements in the list by accessing __len__ from the python list. Secondly we just access one element at a time and retrieves the value.
== Exporting ==
9d491573a2a6d787175e5e55089fc04cde9ffaea
2402
2123
2010-09-04T04:23:56Z
24.18.20.91
0
/* Importing */
wikitext
text/x-wiki
{{Boost::Python}}
Converting to and from a python lists is easy. If you are after a quick and dirty way see the page about [[Boost::Python:_Converting_to_and_from_custom_class_pointers|pointer conversion]].
This is faster but requires more work since you might need to provide a wrapper for your functions. If you just need the function to be used by python this is the better way. Same goes for returning lists.
== Importing ==
{{Box code|Import a list into C++|
<code><cpp/>
void getList(boost::python::list* list){
int n = boost::python::extract<int>(list->attr("__len__")());
for ( int i = 0; i < n; i++ ){
int val = (boost::python::extract<int>((*list)[i]));
}
}
</code>
}}
I think the code basicly explains itself. First we get the number of elements in the list by accessing __len__ from the python list. Secondly we just access one element at a time and retrieves the value.
== Exporting ==
{{Box code|Export a list from C++|
<code><cpp/>
</code>
}}
93b9e3e93b15fdc01c1406c40fce9a594de5e0ca
2123
2116
2007-02-19T14:12:53Z
EXt
1
wikitext
text/x-wiki
{{Boost::Python}}
Converting to and from a python lists is easy. If you are after a quick and dirty way see the page about [[Boost::Python:_Converting_to_and_from_custom_class_pointers|pointer conversion]].
This is faster but requires more work since you might need to provide a wrapper for your functions. If you just need the function to be used by python this is the better way. Same goes for returning lists.
== Importing ==
{{Box code|Import a list into C++|
<code><cpp/>
void getList(boost::python::list* list){
int n = boost::python::extract<int>(list->attr("__len__")());
for ( int i = 0; i < n; i++ ){
int val = (boost::python::extract<int>((*list)[i]));
}
}
</code>
}}
I think the code basicly explains itself. First we get the number of elements in the list by accessing __len__ from the python list. Secondly we just access one element at a time and retrieves the value.
== Exporting ==
{{Box code|Export a list from C++|
<code><cpp/>
</code>
}}
427cd8a3f20155e10866fbf1e4949418cb5a6eed
2116
2104
2007-02-19T01:07:44Z
EXt
1
wikitext
text/x-wiki
{{Boost::Python}}
Converting to and from a python lists is easy. If you are after a quick and dirty way see the page about [[Boost::Python:_Converting_to_and_from_custom_class_pointers|pointer conversion]]. This is faster but requires more work since you might need to provide a wrapper for your functions. If you just need the function to be used by python this is the better way. Same goes for returning lists.
== Importing ==
{{Box code|Import a list into C++|
<code><cpp/>
void getList(boost::python::list* list){
int n = boost::python::extract<int>(list->attr("__len__")());
for ( int i = 0; i < n; i++ ){
int val = (boost::python::extract<int>((*list)[i]));
}
}
</code>
I think the code basicly explains itself. First we get the number of elements in the list by accessing __len__ from the python list. Secondly we just access one element at a time and retrieves the value.
}}
== Exporting ==
{{Box code|Export a list from C++|
<code><cpp/>
</code>
}}
09e3996686574c2bd9dac1f209f8e7e798e120d1
2104
2007-01-13T23:11:30Z
EXt
1
wikitext
text/x-wiki
== Importing ==
{{Box code|Import a list into C++|
<code><cpp/>
void getList(boost::python::list* list){
int n = boost::python::extract<int>(list->attr("__len__")());
for ( int i = 0; i < n; i++ ){
int val = (boost::python::extract<int>((*list)[i]));
}
}
</code>
}}
== Exporting ==
{{Box code|Export a list from C++|
<code><cpp/>
</code>
}}
e3e7f034d0b51fffbff30c20e73804bae29ae471
CMake/Basics
0
1447
2459
2223
2010-12-27T12:07:40Z
EXt
1
proper codebox
wikitext
text/x-wiki
[http://www.cmake.org CMake] is a cross-platform build system. Like most other build system CMake generates Makefiles for *nix based systems but may also generate other project files like KDevelop and Microsoft Visual Studio. I will focus on replacing custom makefiles with CMake.
Below is a very simple makefile which only builds a some c++ source files and links them together. The files have the rather standard *nix directory layout where the source is placed in the src directory and headers in the include directory. The application also relies on an external library named libquux.
<codebox title="Makefile to replace">
VPATH=src
OBJS=main.o fred.o barney.o wilma.o
all: $(OBJS)
g++ $(OBJS) -lquux -o FooBar
%.o : %.cpp
g++ -Iinclude $< -o $@
</codebox>
The first step to use CMake is to create a file called {{Filename|CMakeLists.txt}} in the root directory. This file starts with the project command which specifies the name of the project. This is both a reference to this project and the name of the target created, that is the executable in this case.
<codebox title="Simple CMakeLists.txt (which is just as bad as the Makefile)">
PROJECT(FooBar)
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar quux)
</codebox>
Most of this should be pretty self-explainable. The include_directories command specifies a list of directories which contains headers. The add_executable command creates an executable file from the supplied source files. There isn't a replacement for the makefile VPATH variable but there is other ways to overcome this limitation. Lastly, the target_link_library specifies a set of libraries which must be linked with the application. If one of the libraries is a reference to another project managed by CMake it will build this project before the current one. More about this later.
To build this using CMake you should first create a build directory. While out-of-source builds is the preferred way but it is not necessary. After deciding for a directory to use for the build you issue the command "cmake path/to/CMakeLists.txt", for instance "cmake ..". This will generate the makefiles needed. Assuming everything went well you can just issue make to build everything.
This is a quite straight-forward translation of the makefile but it is not really that much better. For instance the compilation will fail if libquux is not available on the target system. To resolve this issue it is better to let CMake look for the library:
<codebox title="Slightly better CMakeLists.txt">
PROJECT(FooBar)
MESSAGE( STATUS "Looking for quux")
FIND_LIBRARY( QUUX_LIBRARY quux
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Quux library")
IF ( ${QUUX_LIBRARY} )
MESSAGE( STATUS "Looking for quux - found")
ELSE ( ${QUUX_LIBRARY} )
MESSAGE( FATAL_ERROR "Looking for quux - not found")
ENDIF ( ${QUUX_LIBRARY} )
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp)
TARGET_LINK_LIBRARIES(FooBar ${QUUX_LIBRARY})
</codebox>
The find_library command will look for the library quux in the specified directories and set the variable QUUX_LIBRARY if found.
49459fc07fd17a9a7618577f48d016b429b8d413
2223
2222
2008-05-30T18:53:39Z
EXt
1
wikitext
text/x-wiki
[http://www.cmake.org CMake] is a cross-platform build system. Like most other build system CMake generates Makefiles for *nix based systems but may also generate other project files like KDevelop and Microsoft Visual Studio. I will focus on replacing custom makefiles with CMake.
Below is a very simple makefile which only builds a some c++ source files and links them together. The files have the rather standard *nix directory layout where the source is placed in the src directory and headers in the include directory. The application also relies on an external library named libquux.
{{Box code|Makefile to replace|
<nowiki>VPATH=src</nowiki>
<nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki>
<nowiki>all: $(OBJS)</nowiki>
<nowiki>g++ $(OBJS) -lquux -o FooBar</nowiki>
<nowiki>%.o : %.cpp</nowiki>
<nowiki>g++ -Iinclude $< -o $@</nowiki>
}}
The first step to use CMake is to create a file called {{Filename|CMakeLists.txt}} in the root directory. This file starts with the project command which specifies the name of the project. This is both a reference to this project and the name of the target created, that is the executable in this case.
{{Box code|Simple CMakeLists.txt (which is just as bad as the Makefile)|
PROJECT(FooBar)
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar quux)
}}
Most of this should be pretty self-explainable. The include_directories command specifies a list of directories which contains headers. The add_executable command creates an executable file from the supplied source files. There isn't a replacement for the makefile VPATH variable but there is other ways to overcome this limitation. Lastly, the target_link_library specifies a set of libraries which must be linked with the application. If one of the libraries is a reference to another project managed by CMake it will build this project before the current one. More about this later.
To build this using CMake you should first create a build directory. While out-of-source builds is the preferred way but it is not necessary. After deciding for a directory to use for the build you issue the command "cmake path/to/CMakeLists.txt", for instance "cmake ..". This will generate the makefiles needed. Assuming everything went well you can just issue make to build everything.
This is a quite straight-forward translation of the makefile but it is not really that much better. For instance the compilation will fail if libquux is not available on the target system. To resolve this issue it is better to let CMake look for the library:
{{Box code|Slightly better CMakeLists.txt|
PROJECT(FooBar)
MESSAGE( STATUS "Looking for quux")
FIND_LIBRARY( QUUX_LIBRARY quux
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Quux library")
IF ( ${QUUX_LIBRARY} )
MESSAGE( STATUS "Looking for quux - found")
ELSE ( ${QUUX_LIBRARY} )
MESSAGE( FATAL_ERROR "Looking for quux - not found")
ENDIF ( ${QUUX_LIBRARY} )
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp)
TARGET_LINK_LIBRARIES(FooBar ${QUUX_LIBRARY})
}}
The find_library command will look for the library quux in the specified directories and set the variable QUUX_LIBRARY if found.
9ddad975576f638249a0b6d19773958f0bb9ab45
2222
2221
2008-05-30T18:34:17Z
EXt
1
wikitext
text/x-wiki
[http://www.cmake.org CMake] is a cross-platform build system. Like most other build system CMake generates Makefiles for *nix based systems but may also generate other project files like KDevelop and Microsoft Visual Studio. I will focus on replacing custom makefiles with CMake.
Below is a very simple makefile which only builds a some c++ source files and links them together. The files have the rather standard *nix directory layout where the source is placed in the src directory and headers in the include directory. The application also relies on an external library named libquux.
{{Box code|Makefile to replace|
<nowiki>VPATH=src</nowiki>
<nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki>
<nowiki>all: $(OBJS)</nowiki>
<nowiki>g++ $(OBJS) -lquux -o FooBar</nowiki>
<nowiki>%.o : %.cpp</nowiki>
<nowiki>g++ -Iinclude $< -o $@</nowiki>
}}
The first step to use CMake is to create a file called {{Filename|CMakeLists.txt}} in the root directory. This file starts with the project command which specifies the name of the project. This is both a reference to this project and the name of the target created, that is the executable in this case.
{{Box code|Simple CMakeLists.txt (which is just as bad as the Makefile)|
PROJECT(FooBar)
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar quux)
}}
Most of this should be pretty self-explainable. The include_directories command specifies a list of directories which contains headers. The add_executable command creates an executable file from the supplied source files. There isn't a replacement for the makefile VPATH variable but there is other ways to overcome this limitation. Lastly, the target_link_library specifies a set of libraries which must be linked with the application. If one of the libraries is a reference to another project managed by CMake it will build this project before the current one. More about this later.
This is a quite straight-forward translation of the makefile but it is not really that much better. For instance the compilation will fail if libquux is not available on the target system.
{{Box code|Slightly better CMakeLists.txt|
PROJECT(FooBar)
FIND_LIBRARY( QUUX_LIBRARY quux
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Quux library")
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar ${QUUX_LIBRARY})
}}
c2e39e7b6fa4cb7003333a5944f96c5e83f3616c
2221
2210
2008-05-30T18:17:44Z
EXt
1
wikitext
text/x-wiki
[http://www.cmake.org CMake] is a cross-platform build system. Like most other build system CMake generates Makefiles for *nix based systems but may also generate other project files like KDevelop and Microsoft Visual Studio. I will focus on replacing custom makefiles with CMake.
Below is a very simple makefile which only builds a some c++ source files and links them together. The files have the rather standard *nix directory layout where the source is placed in the src directory and headers in the include directory. The application also relies on an external library named libquux.
{{Box code|Makefile to replace|
<nowiki>VPATH=src</nowiki>
<nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki>
<nowiki>all: $(OBJS)</nowiki>
<nowiki>g++ $(OBJS) -lquux -o FooBar</nowiki>
<nowiki>%.o : %.cpp</nowiki>
<nowiki>g++ -Iinclude $< -o $@</nowiki>
}}
The first step to use CMake is to create a file called {{Filename|CMakeLists.txt}} in the root directory.
{{Box code|Simple CMakeLists.txt (which is just as bad as the Makefile)|
PROJECT(FooBar)
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar quux)
}}
{{Box code|Slightly better CMakeLists.txt|
PROJECT(FooBar)
FIND_LIBRARY( QUUX_LIBRARY quux
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Quux library")
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar ${QUUX_LIBRARY})
}}
3f4668eec740031d609a0c8480535d75ef4391f2
2210
2209
2008-05-17T16:48:02Z
EXt
1
wikitext
text/x-wiki
{{Box code|Makefile to replace|
<nowiki>VPATH=src</nowiki>
<nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki>
<nowiki>all: $(OBJS)</nowiki>
<nowiki>g++ $(OBJS) -lquux -o FooBar</nowiki>
<nowiki>%.o : %.cpp</nowiki>
<nowiki>g++ -Iinclude $< -o $@</nowiki>
}}
{{Box code|Simple CMakeLists.txt (which is just as bad as the Makefile)|
PROJECT(FooBar)
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar quux)
}}
{{Box code|Slightly better CMakeLists.txt|
PROJECT(FooBar)
FIND_LIBRARY( QUUX_LIBRARY quux
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Quux library")
INCLUDE_DIRECTORIES(include)
ADD_EXECUTABLE(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
TARGET_LINK_LIBRARIES(FooBar ${QUUX_LIBRARY})
}}
14bfaefe27570e8b1ba1e69bfe1a800dd1ba6f1e
2209
2008-05-12T23:56:05Z
EXt
1
New page: {{Box code|Makefile to replace| <nowiki>VPATH=src</nowiki> <nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki> <nowiki>all: $(OBJS)</nowiki> <nowiki>g++ $(OBJS) -lquux -o FooBar</n...
wikitext
text/x-wiki
{{Box code|Makefile to replace|
<nowiki>VPATH=src</nowiki>
<nowiki>OBJS=main.o fred.o barney.o wilma.o</nowiki>
<nowiki>all: $(OBJS)</nowiki>
<nowiki>g++ $(OBJS) -lquux -o FooBar</nowiki>
<nowiki>%.o : %.cpp</nowiki>
<nowiki>g++ -Iinclude $< -o $@</nowiki>
}}
{{Box code|Simple CMakeLists.txt (which is just as bad as the Makefile)|
project(FooBar)
include_directories(include)
add_executable(FooBar src/main.cpp src/fred.cpp src/barney.cpp src/wilma.cpp)
target_link_libraries(FooBar quux)
}}
33826ab7dcefbc1021a7cb025193be12e6fdf37a
CMake/Configuration files
0
1445
2481
2204
2010-12-29T17:28:27Z
EXt
1
proper codebox
wikitext
text/x-wiki
A configuration file is used in the code either to enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor. By using #cmakedefine you can put defines in the output. For instance, by putting "#cmakedefine FOO" CMake will replace that line with either "#define FOO" or "/* #define FOO */" depending on the state of the corresponding variable ${FOO} in CMake. To get the value of the variable you can use @FOO@, like "#cmakedefine FOO @FOO@".
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same! To get options for enabling or disabling components you can use the OPTION macro.
'''Sample files:'''
<codebox filename="CMakeLists.txt">
# OPTION( VARIABLE "Description" Initial state)
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
</codebox>
<codebox filename="include/config.h.cmake">
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</codebox>
'''Output:'''
<codebox filename="include/config.h">
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</codebox>
[[Category: CMake]]
1ce96e90a9b2e7364f8bb06e2c54cb86e04424b3
2204
2203
2008-05-10T23:24:09Z
Estel
3
wikitext
text/x-wiki
A configuration file is used in the code either to enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor. By using #cmakedefine you can put defines in the output. For instance, by putting "#cmakedefine FOO" CMake will replace that line with either "#define FOO" or "/* #define FOO */" depending on the state of the corresponding variable ${FOO} in CMake. To get the value of the variable you can use @FOO@, like "#cmakedefine FOO @FOO@".
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same! To get options for enabling or disabling components you can use the OPTION macro.
'''Sample files:'''
{{Box code|CMakeLists.txt|
# OPTION( VARIABLE "Description" Initial state)
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
'''Output:'''
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
74c597e3cfdce7f7931dad84ea352fa7c6338181
2203
2202
2008-05-10T23:14:39Z
EXt
1
wikitext
text/x-wiki
A configuration file is used in the code to either enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor. By using #cmakedefine you can put defines in the output. For instance, by putting "#cmakedefine FOO" CMake will replace that line with either "#define FOO" or "/* #define FOO */" depending on the state of the corresponding variable ${FOO} in CMake. To get the value of the variable you can use @FOO@, like "#cmakedefine FOO @FOO@".
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same! To get options for enabling or disabling components you can use the OPTION macro.
'''Sample files:'''
{{Box code|CMakeLists.txt|
# OPTION( VARIABLE "Description" Initial state)
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
'''Output:'''
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
e9a4643c7cabda0c4ebe2e4611fe62419dd5c86c
2202
2201
2008-05-10T23:11:36Z
EXt
1
wikitext
text/x-wiki
A configuration file is used in the code to either enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor. By using #cmakedefine you can put defines in the output. For instance, by putting "#cmakedefine FOO" CMake will replace that line with either "#define FOO" or "/* #define FOO */" depending on the state of the corresponding variable (${FOO}) in CMake. To get the value of the variable you can use @FOO@, like "#cmakedefine FOO @FOO@".
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same! To get options for enabling or disabling components you can use the OPTION macro.
'''Sample files:'''
{{Box code|CMakeLists.txt|
# OPTION( VARIABLE "Description" Initial state)
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
'''Output:'''
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
4ce29bbf324fa288428aa19317368db96e9c3d06
2201
2200
2008-05-10T23:01:38Z
EXt
1
wikitext
text/x-wiki
A configuration file is used in the code to either enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor.
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same!
To get options for enabling or disabling components you can use the OPTION macro.
'''Sample files:'''
{{Box code|CMakeLists.txt|
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
'''Output:'''
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
077271a9f3e7b558e821b4c8ffe65abec1d60b06
2200
2199
2008-05-10T22:58:46Z
EXt
1
wikitext
text/x-wiki
A configuration file is used in the code to either enable/disable features, portability and/or setting flags. The configuration file is usually a header file which is included in every source file (which needs it at least). However, I don't think the CMake manual is as straightforward as it should be.
The first thing to do is to create a template for the configuration file. I will call this file {{Filename|config.h.cmake}} but anything will do, as long as it doesn't conflict with any other file and it must not be the same as the created file. The template file is processed by CMake which works almost like a simple c/c++ preprocessor.
Secondly in your {{Filename|CMakeLists.txt}} use CONFIGURE_FILE to set the filenames. The first argument is the template and the second is the file that will be created. Again, make sure that these aren't the same!
To get options for enabling or disabling components you can use the OPTION macro.
{{Box code|CMakeLists.txt|
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
39ca40033789662d39dccb48539475cc1e5707fe
2199
2008-05-10T21:54:25Z
EXt
1
New page: {{Box code|CMakeLists.txt| OPTION( WITH_FOO "Enable FOO support" ON ) OPTION( WITH_BAR "Enable BAR component" OFF ) SET( BAZ 18 ) CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config...
wikitext
text/x-wiki
{{Box code|CMakeLists.txt|
OPTION( WITH_FOO "Enable FOO support" ON )
OPTION( WITH_BAR "Enable BAR component" OFF )
SET( BAZ 18 )
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/include/config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.h )
}}
{{Box code|include/config.h.cmake|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine WITH_FOO
#cmakedefine WITH_BAR
#cmakedefine BAZ @BAZ@
#endif // CONFIG_H
</code>
}}
{{Box code|include/config.h|
<code><cpp/>
#ifndef CONFIG_H
#define CONFIG_H
#define WITH_FOO
/* #define WITH_BAR */
#define BAZ 18
#endif // CONFIG_H
</code>
}}
[[Category: CMake]]
8944bfa8ed4a5af37c22014eacbd61e0a8d4bd2a
CMake/Find library
0
1448
2217
2008-05-19T07:44:31Z
EXt
1
New page: {{Box code|FindFoo.cmake| IF (WIN32) FIND_PATH( FOO_INCLUDE_PATH foo/foo.h $ENV{PROGRAMFILES}/foo-0.1/include DOC "The directory where foo/foo.h resides") FIND_LIBRARY( FOO_LIBR...
wikitext
text/x-wiki
{{Box code|FindFoo.cmake|
IF (WIN32)
FIND_PATH( FOO_INCLUDE_PATH foo/foo.h
$ENV{PROGRAMFILES}/foo-0.1/include
DOC "The directory where foo/foo.h resides")
FIND_LIBRARY( FOO_LIBRARY
NAMES foo
PATHS
$ENV{PROGRAMFILES}/foo-0.1/lib
DOC "The Foo library")
ELSE (WIN32)
FIND_PATH( FOO_INCLUDE_PATH foo/foo.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
DOC "The directory where foo/foo.h resides")
FIND_LIBRARY( FOO_LIBRARY
NAMES foo
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The Foo library")
ENDIF (WIN32)
IF (FOO_INCLUDE_PATH)
SET( FOO_FOUND 1 CACHE STRING "Set to 1 if Foo is found, 0 otherwise")
ELSE (FOO_INCLUDE_PATH)
SET( FOO_FOUND 0 CACHE STRING "Set to 1 if Foo is found, 0 otherwise")
ENDIF (FOO_INCLUDE_PATH)
MARK_AS_ADVANCED( FOO_FOUND )
}}
{{Box code|CMakeLists.txt|
MESSAGE(STATUS "Looking for Foo")
INCLUDE(FindFoo.cmake)
IF(FOO_FOUND)
MESSAGE(STATUS "Looking for Foo - found")
ELSE(FOO_FOUND)
MESSAGE(FATAL_ERROR "Looking for Foo - not found")
ENDIF(FOO_FOUND)
}}
b36b8969c1e29548425eedddb0f3a4bfb2fdfe78
CMake/Verbose output
0
1449
2458
2219
2010-12-27T12:04:41Z
EXt
1
proper codebox
wikitext
text/x-wiki
CMake has a nice colored output which hides the commandline. This is pretty to look at in the long run but sometimes when you write your configurations you want to know if you got all the compiler flags right. There is two ways to disable the pretty output, well, it's essentialy the same but still two different ways.
The first way is to simply run make with the additional argument "VERBOSE=1". This will show each command being run for this session, which is the most useful way to see if the flags is correct.
<codebox>
% make VERBOSE=1
</codebox>
The second way is to permanently disable the pretty output in your CMakeLists.txt by setting CMAKE_VERBOSE_MAKEFILE.
<codebox title="CMakeLists.txt">
set( CMAKE_VERBOSE_MAKEFILE on )
</codebox>
b8c1c11c6e2829e78dd538d7ec7a0c809a21725e
2219
2008-05-19T18:54:40Z
EXt
1
New page: CMake has a nice colored output which hides the commandline. This is pretty to look at in the long run but sometimes when you write your configurations you want to know if you got all the ...
wikitext
text/x-wiki
CMake has a nice colored output which hides the commandline. This is pretty to look at in the long run but sometimes when you write your configurations you want to know if you got all the compiler flags right. There is two ways to disable the pretty output, well, it's essentialy the same but still two different ways.
The first way is to simply run make with the additional argument "VERBOSE=1". This will show each command being run for this session, which is the most useful way to see if the flags is correct.
{{Box code||
<nowiki>% make VERBOSE=1</nowiki>
}}
The second way is to permanently disable the pretty output in your CMakeLists.txt by setting CMAKE_VERBOSE_MAKEFILE.
{{Box code|CMakeLists.txt|
set( CMAKE_VERBOSE_MAKEFILE on )
}}
f6c3ddef031a0a76321925690da94fce993365c7
Cacti
0
1611
2701
2012-07-02T19:57:03Z
EXt
1
unfinished, only a pasted log
wikitext
text/x-wiki
[19:08:34] <@Gnitset> hmm, det varkar inte com cacti i debian trycker in sakerna för nätmonitirering by default. så det kan underlätta med netsnmpd
[19:09:08] <@Gnitset> som i debian heter snmpd
[19:16:39] <@Gnitset> sen vill man ta bort kommentaren på rad 49 i /etc/snmp/snmpd.conf
[19:18:19] <@Gnitset> man gör det på det enklaste sättet så installerar man cacti och snmpd. går in på /cacti/ och gör färdigt installationen genom att klicka nästa
[19:18:25] <@Gnitset> sen loggar min med admin/admin
[19:18:33] <@Gnitset> sätter nytt lösen
[19:19:26] <@Gnitset> sen går till devices och lägger till en ny av typen generic snmp, hostname måste vara 127.0.0.1, snmpversion ska vara 2
[19:19:54] <@Gnitset> man vill ha gjort ändringen i snmpd.conf och startat om snmpd innan den sista biten dock
[19:20:17] <@Gnitset> för när man skapar den nya hosten så gör den ett snmpuppslag och tar rad på vad den kan monitorera
[19:22:18] <@Gnitset> på hosten man just skapat finns "Associated Data Queries"
[19:22:50] <@Gnitset> där ska det finnas en "SNMP - Interface Statistics" som ska ha status tex "Success [34 Items, 4 Rows]"
[19:23:15] <@Gnitset> då hr den hittat 4 interface (i mitt fall lo eth0 eth1 bond0)
[19:23:52] <@Gnitset> då kan man sen bara gå upp till höger och klicka på "Create Graphs for this Host"
[19:24:09] <@Gnitset> där kan man välja vilka interface och vilken sorts graf man vill ha
[19:24:38] <@Gnitset> vill man ha flera grafer på samma if men olika typ får man gör det e ett par omgångar
[19:25:05] <@Gnitset> sen vill man för enkelhetens skull lägga upp sin host på listan över grafer
[19:25:25] <@Gnitset> till vänster finns "Graph Trees" ganska högt upp i menyn
[19:25:55] <@Gnitset> där går man in på "Default Tree" och väljer add och addar hosten
[19:38:56] < Sanfred> what.. "Location: Sitting on the Dock of the Bay" (har jag skrivit det?)
[19:39:09] < Sanfred> undrar om det är cacti, snmpd eller debian som trollar
[19:39:25] <@Gnitset> debian trollar genom snmpd
[19:39:33] <@Gnitset> rad 77
[19:46:32] <@Gnitset> den kör ett cronjob var 5te min som måste köras 2ggr
[19:48:29] <@Gnitset> www-data
[19:48:30] <@Gnitset> grep . /etc/cron.d/cacti
[[Category:Linux]]
[[Category:SNMP]]
a09ac1a08e4c8525f1d68f3a55c830d6089e3e1d
Cairo+glitz/Setup cairo
0
1488
2480
2302
2010-12-29T17:25:21Z
EXt
1
proper codebox
wikitext
text/x-wiki
{{Box note|glitz support in cairo-1.8 is broken!}}
See [[cairo+glitz/Setup glitz with glx]] for details about getting glitz to work.
== Cairo surface ==
One the glitz surface is created it is actually quite simple to have cairo use it as backend.
<codebox>
// Create a cairo surface with glitz as backend.
cairo_surface_t* pCairoSurface = cairo_glitz_surface_create (surface);
// Create the cairo context as usual.
cairo_t* cr = cairo_create (pCairoSurface);
</codebox>
== Rendering sample ==
<codebox>
// Clear the surface.
cairo_scale(cr, 2.5, 2.5);
cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
cairo_paint (cr);
// Use default operator and color.
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
// This is one of the samples provided by the cairo documentation, see http://www.cairographics.org/samples/curve_to/
double x=25.6, y=128.0;
double x1=102.4, y1=230.4,
x2=153.6, y2=25.6,
x3=230.4, y3=128.0;
cairo_move_to (cr, x, y);
cairo_curve_to (cr, x1, y1, x2, y2, x3, y3);
cairo_set_line_width (cr, 10.0);
cairo_stroke (cr);
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
cairo_set_line_width (cr, 6.0);
cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1);
cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3);
cairo_stroke (cr);
// Swap buffers using glitz.
glitz_drawable_swap_buffers(drawable);
</codebox>
b4137ca081bd14c2760bb69637bfb6f7b33a6a54
2302
2299
2009-01-14T08:48:51Z
EXt
1
wikitext
text/x-wiki
{{Box note|glitz support in cairo-1.8 is broken!}}
See [[cairo+glitz/Setup glitz with glx]] for details about getting glitz to work.
== Cairo surface ==
One the glitz surface is created it is actually quite simple to have cairo use it as backend.
<code><cpp/>
// Create a cairo surface with glitz as backend.
cairo_surface_t* pCairoSurface = cairo_glitz_surface_create (surface);
// Create the cairo context as usual.
cairo_t* cr = cairo_create (pCairoSurface);
</code>
== Rendering sample ==
<code><cpp/>
// Clear the surface.
cairo_scale(cr, 2.5, 2.5);
cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
cairo_paint (cr);
// Use default operator and color.
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
// This is one of the samples provided by the cairo documentation, see http://www.cairographics.org/samples/curve_to/
double x=25.6, y=128.0;
double x1=102.4, y1=230.4,
x2=153.6, y2=25.6,
x3=230.4, y3=128.0;
cairo_move_to (cr, x, y);
cairo_curve_to (cr, x1, y1, x2, y2, x3, y3);
cairo_set_line_width (cr, 10.0);
cairo_stroke (cr);
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
cairo_set_line_width (cr, 6.0);
cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1);
cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3);
cairo_stroke (cr);
// Swap buffers using glitz.
glitz_drawable_swap_buffers(drawable);
</code>
b61c295ffb49bbc722f5d71c69583e62b9c04f50
2299
2298
2009-01-06T12:00:41Z
EXt
1
wikitext
text/x-wiki
{{Box note|glitz support in cairo-1.8 is broken!}}
== Cairo surface ==
One the glitz surface is created it is actually quite simple to have cairo use it as backend.
<code><cpp/>
// Create a cairo surface with glitz as backend.
cairo_surface_t* pCairoSurface = cairo_glitz_surface_create (surface);
// Create the cairo context as usual.
cairo_t* cr = cairo_create (pCairoSurface);
</code>
== Rendering sample ==
<code><cpp/>
// Clear the surface.
cairo_scale(cr, 2.5, 2.5);
cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
cairo_paint (cr);
// Use default operator and color.
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
// This is one of the samples provided by the cairo documentation, see http://www.cairographics.org/samples/curve_to/
double x=25.6, y=128.0;
double x1=102.4, y1=230.4,
x2=153.6, y2=25.6,
x3=230.4, y3=128.0;
cairo_move_to (cr, x, y);
cairo_curve_to (cr, x1, y1, x2, y2, x3, y3);
cairo_set_line_width (cr, 10.0);
cairo_stroke (cr);
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
cairo_set_line_width (cr, 6.0);
cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1);
cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3);
cairo_stroke (cr);
// Swap buffers using glitz.
glitz_drawable_swap_buffers(drawable);
</code>
a058135bf0fde69e71f7982fbbd3ec40e33d05f5
2298
2009-01-06T11:49:41Z
EXt
1
New page: <code><cpp/> cairo_surface_t* pCairoSurface = cairo_glitz_surface_create (surface); cairo_t* cr = cairo_create (pCairoSurface); cairo_surface_destroy (pCairoSurface); glitz_surface_de...
wikitext
text/x-wiki
<code><cpp/>
cairo_surface_t* pCairoSurface = cairo_glitz_surface_create (surface);
cairo_t* cr = cairo_create (pCairoSurface);
cairo_surface_destroy (pCairoSurface);
glitz_surface_destroy (surface);
</code>
<code><cpp/>
cairo_scale(cr, 2.5, 2.5);
cairo_set_source_rgba (cr, 1.0f, 1.0f, 1.0f, 1.0f);
cairo_paint (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_set_source_rgba (cr, 0.0f, 0.0f, 0.0f, 1.0f);
double x=25.6, y=128.0;
double x1=102.4, y1=230.4,
x2=153.6, y2=25.6,
x3=230.4, y3=128.0;
cairo_move_to (cr, x, y);
cairo_curve_to (cr, x1, y1, x2, y2, x3, y3);
cairo_set_line_width (cr, 10.0);
cairo_stroke (cr);
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
cairo_set_line_width (cr, 6.0);
cairo_move_to (cr,x,y); cairo_line_to (cr,x1,y1);
cairo_move_to (cr,x2,y2); cairo_line_to (cr,x3,y3);
cairo_stroke (cr);
glitz_drawable_swap_buffers(drawable);
</code>
58239f7e02839d229f62114f5b827c9f42803046
Cairo+glitz/Setup glitz with glx
0
1487
2489
2471
2011-03-11T10:40:33Z
EXt
1
glitz dropped
wikitext
text/x-wiki
{{box note|The glitz backend for cairo has been dropped in favor of GL surface.}}
[http://www.freedesktop.org/wiki/Software/glitz glitz] is an [http://www.opengl.org/ OpenGL] image compositing library partially designed to act as a [http://cairographics.org/ cairo] backend. Getting glitz to work can be a bit tricky especially due to the lack of documentation. Lack of good documentation and samples for Xlib/glx makes it even worse, but I find that common with anything related to Xlib. This will be a simple tutorial on how to get glitz to work. I assume you have a basic understanding of Xlib and glx before reading this.
== Creating a window ==
First we open a X display as usual.
<codebox>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</codebox>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<codebox>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</codebox>
Next up is actually creating the window.
<codebox>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</codebox>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the OpenGL context and drawable usually created when using Xlib and OpenGL.
<codebox>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</codebox>
Next part: [[cairo+glitz/Setup cairo]].
2a3410e613372e76fd8203ff76f11af14b208137
2471
2304
2010-12-29T15:42:32Z
EXt
1
proper codebox
wikitext
text/x-wiki
[http://www.freedesktop.org/wiki/Software/glitz glitz] is an [http://www.opengl.org/ OpenGL] image compositing library partially designed to act as a [http://cairographics.org/ cairo] backend. Getting glitz to work can be a bit tricky especially due to the lack of documentation. Lack of good documentation and samples for Xlib/glx makes it even worse, but I find that common with anything related to Xlib. This will be a simple tutorial on how to get glitz to work. I assume you have a basic understanding of Xlib and glx before reading this.
== Creating a window ==
First we open a X display as usual.
<codebox>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</codebox>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<codebox>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</codebox>
Next up is actually creating the window.
<codebox>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</codebox>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the OpenGL context and drawable usually created when using Xlib and OpenGL.
<codebox>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</codebox>
Next part: [[cairo+glitz/Setup cairo]].
a084a2c27b3e772e2448c5dbb5c198aa9b1a068c
2304
2297
2009-01-16T21:08:50Z
EXt
1
wikitext
text/x-wiki
[http://www.freedesktop.org/wiki/Software/glitz glitz] is an [http://www.opengl.org/ OpenGL] image compositing library partially designed to act as a [http://cairographics.org/ cairo] backend. Getting glitz to work can be a bit tricky especially due to the lack of documentation. Lack of good documentation and samples for Xlib/glx makes it even worse, but I find that common with anything related to Xlib. This will be a simple tutorial on how to get glitz to work. I assume you have a basic understanding of Xlib and glx before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the OpenGL context and drawable usually created when using Xlib and OpenGL.
<code><cpp/>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</code>
Next part: [[cairo+glitz/Setup cairo]].
ccf9af1db1d64ffda79b4d345ed60593fd56fa97
2297
2296
2009-01-06T11:44:04Z
EXt
1
wikitext
text/x-wiki
[http://www.freedesktop.org/wiki/Software/glitz glitz] is an [http://www.opengl.org/ OpenGL] image compositing library partially designed to act as a [http://cairographics.org/ cairo] backend. Getting glitz to work can be a bit tricky especially due to the lack of documentation, but I find that common with anything related to Xlib. This will be a simple tutorial on how to get glitz to work. I assume you have a basic understanding of Xlib before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the OpenGL context and drawable usually created when using Xlib and OpenGL.
<code><cpp/>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</code>
Next part: [[cairo+glitz/Setup cairo]].
325be4a7d7a9cdd5b3abd44b373697aac98f0f77
2296
2295
2009-01-06T11:09:07Z
EXt
1
wikitext
text/x-wiki
[http://www.freedesktop.org/wiki/Software/glitz glitz] is an [http://www.opengl.org/ OpenGL] image compositing library partially designed to act as a [http://cairographics.org/ cairo] backend. Getting glitz to work can be a bit tricky especially due to the lack of documentation, but I find that common with anything related to Xlib. This will be a simple tutorial on how to get glitz to work. I assume you have a basic understanding of Xlib before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the OpenGL context and drawable usually created when using Xlib and OpenGL.
<code><cpp/>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</code>
c73a9d41bf503f5ed59a7365dedda1a7b07fb0d7
2295
2294
2009-01-06T10:49:08Z
EXt
1
wikitext
text/x-wiki
Getting glitz to work can be a bit tricky especially due to the lack of documentation, but I find that common with anything related to Xlib. I assume you have a basic understanding of Xlib before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the opengl context and drawable usually created when using Xlib and opengl.
<code><cpp/>
// Create the glitz drawable. If this is the first time it is called it will create the opengl context and make it the current.
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
// A glitz_format_t must be used when creating a surface. Not that this is not the same format as glitz_drawable_format_t used earlier.
// Similar to before a template is created and a matching format is searched for.
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
// Create a surface with above format.
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
// The surface buffer must be bound to the drawable. The surface buffer is the buffer which rendering
// calls is made to. If a doublebuffered surface is selected the backbuffer will used.
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
// Bind the surface buffer to the drawable.
glitz_surface_attach (surface, drawable, buffer);
</code>
c272bd7a628d786076d6cca1f6e1d80d48709862
2294
2293
2009-01-06T10:41:12Z
EXt
1
wikitext
text/x-wiki
Getting glitz to work can be a bit tricky especially due to the lack of documentation, but I find that common with anything related to Xlib. I assume you have a basic understanding of Xlib before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the opengl context and drawable usually created when using Xlib and opengl.
<code><cpp/>
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
glitz_surface_attach (surface, drawable, buffer);
</code>
f64e61b842b65ab96a20c02aaaeff405229181ae
2293
2292
2009-01-06T10:40:14Z
EXt
1
wikitext
text/x-wiki
Getting glitz to work can be a bit tricky especially due to the lack of documentation, but I find that common with anything related to Xlib. I assume you have a basic understanding of Xlib before reading this.
== Creating a window ==
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
Next up is actually creating the window.
<code><cpp/>
// Reference to the root-window.
Window root = DefaultRootWindow(display);
// Creates the colormap
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
// Window attributes
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask;
unsigned long mask = CWColormap | CWEventMask;
// Create a window using the earlier found XVisualInfo.
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
// Make it possible to "correctly" close the window.
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
== Creating a drawable surface ==
After the window is created we create a glitz drawable which is used to create glitz surfaces. Behind the scenes this is kind of the opengl context and drawable usually created when using Xlib and opengl.
<code><cpp/>
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
glitz_surface_attach (surface, drawable, buffer);
</code>
1580461fec4ee13fac20728f6463d5e8ead0f395
2292
2291
2009-01-06T10:15:18Z
EXt
1
wikitext
text/x-wiki
Getting glitz to work can be a bit tricky especially due to the lack of documentation.
First we open a X display as usual.
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
When creating the X window a XVisualInfo is needed. glitz requires a glitz_drawable_format_t which is related to the XVisualInfo. These two should match but I have seen cases where non matching similar formats has been used. I found it simpler to search for a suitable drawable format and extract the visual info from it than the other way around.
<code><cpp/>
// A template format is specified.
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
// Only the fields specified by this mask will be matched.
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
// glitz_glx_find_window_format searches the available formats for one matching the template. The zero in the end specifies
// which format to use, zero means the first matching. It is possible to iterate over the available formats by increasing
// this value until NULL is returned.
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
// As the name implies glitz_glx_get_visual_info_from_format extracts a XVisualInfo from a glitz_drawable_format_t.
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
<code><cpp/>
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask ;
unsigned long mask = CWColormap | CWEventMask;
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
<code><cpp/>
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
glitz_surface_attach (surface, drawable, buffer);
</code>
2c5690fbd5b54aa5f75ac5bafbf55583fb732c33
2291
2290
2009-01-06T09:58:35Z
EXt
1
wikitext
text/x-wiki
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
<code><cpp/>
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
<code><cpp/>
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask ;
unsigned long mask = CWColormap | CWEventMask;
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
<code><cpp/>
glitz_drawable_t* drawable = glitz_glx_create_drawable_for_window (display, screen, dformat, window, 800, 600);
glitz_format_t *format, templ;
glitz_drawable_buffer_t buffer;
templ.color = dformat->color;
format = glitz_find_format (drawable,
GLITZ_FORMAT_FOURCC_MASK |
GLITZ_FORMAT_RED_SIZE_MASK |
GLITZ_FORMAT_GREEN_SIZE_MASK |
GLITZ_FORMAT_BLUE_SIZE_MASK |
GLITZ_FORMAT_ALPHA_SIZE_MASK,
&templ,
0
);
if (!format) {
fprintf (stderr, "Error: couldn't find surface format\n");
return NULL;
}
glitz_surface_t* surface = glitz_surface_create (drawable, format, 800, 600, 0, NULL);
if (!surface) {
fprintf (stderr, "Error: couldn't create glitz surface\n");
return NULL;
}
if (dformat->doublebuffer) {
buffer = GLITZ_DRAWABLE_BUFFER_BACK_COLOR;
} else {
buffer = GLITZ_DRAWABLE_BUFFER_FRONT_COLOR;
}
glitz_surface_attach (surface, drawable, buffer);
</code>
d25d59bd646296461198d662a08772a1a04caedc
2290
2009-01-06T09:47:35Z
EXt
1
New page: <code><cpp/> Display* display = XOpenDisplay(NULL); unsigned int screen = DefaultScreen(display); </code> <code><cpp/> glitz_drawable_format_t templ; templ.samples = 1; templ.depth_s...
wikitext
text/x-wiki
<code><cpp/>
Display* display = XOpenDisplay(NULL);
unsigned int screen = DefaultScreen(display);
</code>
<code><cpp/>
glitz_drawable_format_t templ;
templ.samples = 1;
templ.depth_size = 24;
templ.doublebuffer = 1;
unsigned long format_mask = GLITZ_FORMAT_SAMPLES_MASK | GLITZ_FORMAT_DOUBLEBUFFER_MASK | GLITZ_FORMAT_DEPTH_SIZE_MASK;
glitz_drawable_format_t* dformat = glitz_glx_find_window_format (display, screen, format_mask, &templ, 0);
if (!dformat) {
fprintf (stderr, "Error: couldn't find window format\n");
return 1;
}
XVisualInfo* vinfo = glitz_glx_get_visual_info_from_format (display, screen, dformat);
if (!vinfo) {
fprintf (stderr, "Error: no visual info from format\n");
return 1;
}
</code>
<code><cpp/>
Colormap cmap = XCreateColormap(display, root, vinfo->visual, AllocNone);
XSetWindowAttributes swa;
swa.colormap = cmap;
swa.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask ;
unsigned long mask = CWColormap | CWEventMask;
Window window = XCreateWindow(display, root, 0, 0, 800, 600, 0, vinfo->depth, InputOutput, vinfo->visual, mask, &swa);
XMapWindow(display, window);
Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(display, window, &wm_delete_window, 1);
XSync(display, false);
</code>
82a300e89cf6b069ac1d1f69332b2df7b0806f48
Changing appearance of a button
0
1380
2457
1919
2010-12-27T12:03:13Z
EXt
1
proper codebox
wikitext
text/x-wiki
To change the appearance of a button is quite simple once you learned it.
# Load the texture containing the images.
# Create an imageset and define the images you to use.
# Set the button to use custom images and which
I assume you know how to create the texture and the imageset (if not, look in the example and the documentation). In the example below I use two images, one normal and one when hovering/clicking. I think the code speaks for itself.
<codebox>
CEGUI::Texture* texturePtr = CEGUI::System::getSingletonPtr()->getRenderer()->createTexture("buttons.png","Data/Media/Menu");
CEGUI::Imageset* ButtonsImageset = CEGUI::ImagesetManager::getSingletonPtr()->createImageset("Buttons",texturePtr);
ButtonsImageset->defineImage("ButtonUp",CEGUI::Point(1,1),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
ButtonsImageset->defineImage("ButtonDown",CEGUI::Point(1,256),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
button->setProperty("UseStandardImagery", "false");
button->setProperty("NormalImage", "set:Buttons image:ButtonUp");
button->setProperty("HoverImage", "set:Buttons image:ButtonDown");
button->setProperty("PushedImage", "set:Buttons image:ButtonDown");
</codebox>
57b7c783cc18d652e1197a010dd9fc0bfe9d17da
1919
1916
2006-05-18T10:01:52Z
EXt
1
wikitext
text/x-wiki
To change the appearance of a button is quite simple once you learned it.
# Load the texture containing the images.
# Create an imageset and define the images you to use.
# Set the button to use custom images and which
I assume you know how to create the texture and the imageset (if not, look in the example and the documentation). In the example below I use two images, one normal and one when hovering/clicking. I think the code speaks for itself.
<code><cpp/>
CEGUI::Texture* texturePtr = CEGUI::System::getSingletonPtr()->getRenderer()->createTexture("buttons.png","Data/Media/Menu");
CEGUI::Imageset* ButtonsImageset = CEGUI::ImagesetManager::getSingletonPtr()->createImageset("Buttons",texturePtr);
ButtonsImageset->defineImage("ButtonUp",CEGUI::Point(1,1),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
ButtonsImageset->defineImage("ButtonDown",CEGUI::Point(1,256),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
button->setProperty("UseStandardImagery", "false");
button->setProperty("NormalImage", "set:Buttons image:ButtonUp");
button->setProperty("HoverImage", "set:Buttons image:ButtonDown");
button->setProperty("PushedImage", "set:Buttons image:ButtonDown");
</code>
eb37fc99321269671f1a655853bf25455e04851e
1916
1913
2006-05-18T07:33:32Z
EXt
1
[[Changing skin on a button]] moved to [[Changing appearance of a button]]
wikitext
text/x-wiki
<code><cpp/>
CEGUI::Texture* texturePtr = CEGUI::System::getSingletonPtr()->getRenderer()->createTexture("buttons.png","Data/Media/Menu");
CEGUI::Imageset* ButtonsImageset = CEGUI::ImagesetManager::getSingletonPtr()->createImageset("Buttons",texturePtr);
ButtonsImageset->defineImage("ButtonUp",CEGUI::Point(1,1),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
ButtonsImageset->defineImage("ButtonDown",CEGUI::Point(1,256),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
button->setProperty("UseStandardImagery", "false");
button->setProperty("NormalImage", "set:Buttons image:ButtonUp");
button->setProperty("HoverImage", "set:Buttons image:ButtonDown");
button->setProperty("PushedImage", "set:Buttons image:ButtonDown");
</code>
ff89487a3fcf0b3e413c79f5edb10ebb4fe87bb2
1913
2006-05-16T07:38:55Z
EXt
1
wikitext
text/x-wiki
<code><cpp/>
CEGUI::Texture* texturePtr = CEGUI::System::getSingletonPtr()->getRenderer()->createTexture("buttons.png","Data/Media/Menu");
CEGUI::Imageset* ButtonsImageset = CEGUI::ImagesetManager::getSingletonPtr()->createImageset("Buttons",texturePtr);
ButtonsImageset->defineImage("ButtonUp",CEGUI::Point(1,1),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
ButtonsImageset->defineImage("ButtonDown",CEGUI::Point(1,256),CEGUI::Size( 431, 64 ),CEGUI::Point(0.0f,0.0f));
button->setProperty("UseStandardImagery", "false");
button->setProperty("NormalImage", "set:Buttons image:ButtonUp");
button->setProperty("HoverImage", "set:Buttons image:ButtonDown");
button->setProperty("PushedImage", "set:Buttons image:ButtonDown");
</code>
ff89487a3fcf0b3e413c79f5edb10ebb4fe87bb2
Changing skin on a button
0
1382
1917
2006-05-18T07:33:32Z
EXt
1
[[Changing skin on a button]] moved to [[Changing appearance of a button]]
wikitext
text/x-wiki
#REDIRECT [[Changing appearance of a button]]
6a89cdbd8fee0b32990e7bd077531a56e1455ac7
Code snippets
0
1370
3031
2468
2015-07-15T14:34:00Z
EXt
1
/* Struct with variable size */
wikitext
text/x-wiki
=== Hold states of various things ===
<codebox>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</codebox>
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Struct with variable size ===
<codebox>
typedef struct {
int foo;
float bar;
char baz[0];
} fred_t;
const char* quux = "my string";
fred_t* barney = malloc( sizeof(fred_t) + strlen(quux) );
strcpy(barney->baz, quux);
</codebox>
This is useful if you want to pack data into a struct and not just fill the struct with pointers. As the data is packed tighter this might increase performance (cache misses etc). It's also easier when saving/loading because not pointers has to be handled.
=== Creating a dynamic library with GCC ===
<codebox>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</codebox>
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
<codebox>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</codebox>
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
[[Category:C/Cpp]]
[[Category:Linux]]
1806432d7c5dc4e95d0cad5888101cc68323f8b1
2468
2137
2010-12-29T01:03:36Z
EXt
1
proper codebox
wikitext
text/x-wiki
=== Hold states of various things ===
<codebox>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</codebox>
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Struct with variable size ===
<codebox>
typedef struct {
int foo;
float bar;
char baz[1];
} fred_t;
const char* quux = "my string";
fred_t* barney = malloc( sizeof(fred_t) + strlen(quux) );
strcpy(barney->baz, quux);
</codebox>
This is useful if you want to pack data into a struct and not just fill the struct with pointers. As the data is packed tighter this might increase performance (cache misses etc). It's also easier when saving/loading because not pointers has to be handled.
=== Creating a dynamic library with GCC ===
<codebox>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</codebox>
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
<codebox>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</codebox>
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
[[Category:C/Cpp]]
[[Category:Linux]]
d88e05329ed987eb8fb308fae72790df3729e42a
2137
2049
2007-11-19T16:59:57Z
EXt
1
Wrote about structs with variable size
wikitext
text/x-wiki
=== Hold states of various things ===
{{Box code||
<code><cpp/>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</code>
}}
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Struct with variable size ===
{{Box code||
<code><cpp/>
typedef struct {
int foo;
float bar;
char baz[1];
} fred_t;
const char* quux = "my string";
fred_t* barney = malloc( sizeof(fred_t) + strlen(quux) );
strcpy(barney->baz, quux);
</code>
}}
This is useful if you want to pack data into a struct and not just fill the struct with pointers. As the data is packed tighter this might increase performance (cache misses etc). It's also easier when saving/loading because not pointers has to be handled.
=== Creating a dynamic library with GCC ===
{{Box code||
<code><cpp/>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</code>
}}
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
{{Box code||
<code><sh/>
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
</code>
}}
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
{{Box code||
<code><cpp/>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</code>
}}
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
[[Category:C/Cpp]]
[[Category:Linux]]
24e876fe7fd6eea63a1def290f630af30fa0ec1e
2049
2048
2006-09-01T14:12:58Z
EXt
1
wikitext
text/x-wiki
=== Hold states of various things ===
{{Box code||
<code><cpp/>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</code>
}}
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Creating a dynamic library with GCC ===
{{Box code||
<code><cpp/>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</code>
}}
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
{{Box code||
<code><sh/>
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
</code>
}}
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
{{Box code||
<code><cpp/>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</code>
}}
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
[[Category:C/Cpp]]
[[Category:Linux]]
afda70579ed7a14153af0ba598e8e443b2912a20
2048
1954
2006-09-01T14:12:23Z
EXt
1
wikitext
text/x-wiki
=== Hold states of various things ===
{{Box code||
<code><cpp/>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</code>
}}
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Creating a dynamic library with GCC ===
{{Box code||
<code><cpp/>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</code>
}}
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
{{Box code||
<code><sh/>
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
</code>
{{Box code||
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
{{Box code||
<code><cpp/>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</code>
}}
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
[[Category:C/Cpp]]
[[Category:Linux]]
f6225a0c2c16ef82e8e1e77e5faa5e5815c7ae98
1954
1393
2006-07-17T21:01:29Z
EXt
1
spelling
wikitext
text/x-wiki
=== Hold states of various things ===
<code><cpp/>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</code>
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Creating a dynamic library with GCC ===
<code><cpp/>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</code>
This is going to be our library. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
<code><sh/>
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
</code>
When compiling the library we use the -fPIC argument. This will generate the position-independent code needed when using a library. When we link our code we use the argument -shared to create a shared dynamic library. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the library name is Barney, the file should be named libBarney.so.
<code><cpp/>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</code>
To use the library just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
210db08ca4356ee3882632109544569c44761bb6
1393
1384
2006-05-07T13:48:55Z
EXt
1
wikitext
text/x-wiki
=== Hold states of various things ===
<code><cpp/>
typedef enum {
ITEM1,
ITEM2,
ITEM3,
ITEM4,
ITEM_SIZE
} ITEMS;
</code>
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
=== Creating a dynamic libary with GCC ===
<code><cpp/>
#include "mylib.h"
/**
* My useless function
*/
int tux(int a,int b){
return (a+b)/(b-a);
}
</code>
This is going to be our libary. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
<code><sh/>
g++ -fPIC -c dynamic_libary.cpp
g++ -shared -o libTest.so dynamic_libary.o
</code>
When compiling the libary we use the -fPIC argument. This will generate the position-independent code needed when using a libary. When we link our code we use the argument -shared to create a shared dynamic libary. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the libary name is Barney, the file should be named libBarney.so.
<code><cpp/>
#include <mylib.h> /* Since the header is */
#include <iostream> /* located in /usr/include */
/* we can use <> */
using namespace std;
int main(int argc,char* argv[]){
cout << tux(5,10) << endl;
return 0;
}
</code>
To use the libary just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
90d78159019b19b99f3c0baacee3eeaadf09e3d8
1384
2006-05-06T14:16:47Z
EXt
1
wikitext
text/x-wiki
Hold states of various things
Code: enum.cpp
This will create an enumeration with 4 items excluding the size constant. Now we can declare an array with a size equal to the nr of items in the enum. If we want to change the state of item4 just do fred[ITEM4]=true;. An example of where this is useful: We read keyboard input and set KEY_Q to true when Q is pressed and to false when it is released. This way we can run function barney() as long as KEY_Q is true. Need another key? Just add that to the enumeration, whereever you want. It won't interfere with earlier keys. And you could do like this with anything, ints, char* or even classes. Need to set the default values of the array? Just iterate through it, for (int i=0;i<ITEM_SIZE;i++).
Creating a dynamic libary with GCC
Code: dynamic_libary.cpp
This is going to be our libary. It has one simple function, tux, which takes to integer parameters and just does some random math with them. It includes a header, mylib.h, which isn't shown here because it just contains the prototype. But remember that the header is just as important as the code itself since we will only be able to call the functions that has its prototypes there. Unless we know about them and writes our own prototypes.
Code: dynamic_libary
When compiling the libary we use the -fPIC argument. This will generate the position-independent code needed when using a libary. When we link our code we use the argument -shared to create a shared dynamic libary. Well, thats it. It isn't any harder than that. I suggest you now copy your header to /usr/include and the libary to /usr/lib. Remember that if the libary name is Barney, the file should be named libBarney.so.
Code: dynamic_libary_test.cpp
To use the libary just include the header with the prototypes and we can use the function. When linking just include the argument -lTest.
1eba0867d68cbf69dfe53b37b9ff01596cc63ba0
DeMorgan transformations
0
1443
2193
2008-04-09T20:09:05Z
EXt
1
New page: {| !| Initial expression !| Code !| Equivalent expression !| Code |- | not A and not B | !A && !B | not ( A or B ) | !( A <nowiki>||</nowiki> B ) |- | not A and B | !A && B | not ( A or ...
wikitext
text/x-wiki
{|
!| Initial expression
!| Code
!| Equivalent expression
!| Code
|-
| not A and not B
| !A && !B
| not ( A or B )
| !( A <nowiki>||</nowiki> B )
|-
| not A and B
| !A && B
| not ( A or not B )
| !( A <nowiki>||</nowiki> !B )
|-
| A and not B
| A && !B
| not ( not A or B )
| !( !A <nowiki>||</nowiki> B )
|-
| A and B
| A && B
| not ( not A or not B )
| !( !A <nowiki>||</nowiki> !B )
|-
| not A or not B
| !A <nowiki>||</nowiki> !B
| not ( A and B )
| !( A && B )
|-
| not A or B
| !A <nowiki>||</nowiki> B
| not ( A and not B )
| !( A && !B )
|-
| A or not B
| A <nowiki>||</nowiki> !B
| not ( not A and B )
| !( !A && B )
|-
| A or B
| A <nowiki>||</nowiki> B
| not ( not A and not B )
| !( !A && !B )
|}
9e13ad8b0ae9219d663018bfa338c03b0b55d42a
Debugging
0
1433
3047
2152
2015-08-08T01:26:09Z
EXt
1
cleanup
wikitext
text/x-wiki
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
__TOC__
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
<codebox title="Buffer overflow" lang="cpp">
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</codebox>
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
=== Memory blocks ===
A great way of knowing whenever a pointer is a dangling reference or not is to have some custom data before the actual data, a memory header. This requires to overloading of ''operator {{keyword|new}}''. When allocating memory allocate ''sizeof(header_t)'' + the requested size. Cast the allocated memory to a ''header_t'' and fill the values with a predefined signature (can be anything), size should be the originally requested size and data should be a pointer to the first byte '''after''' the header. Remember to return the value of the data pointer, not to the entire block of memory! Another good idea is to clear these values in ''operator delete'' as a dangling reference might have the header intact but the data corrupted.
<codebox title="Simple memory block" lang="cpp">
typedef struct {
char signature[2];
int size;
void* data;
} header_t;
</codebox>
Now, once the application crashes and we believe the cause is a dangling reference we can
# Cast the pointer to a char pointer (or any pointer to a datatype which is one byte large)
# Substract <tt>sizeof(header_t)</tt> from it
# Cast to a <tt>header_t</tt>
Then one would just see if the values are correct. The above steps is possible to do with gdb but I don't belive it is possible with MSVC. Anyway, it is usually a good idea to write a function which retrieves a header from a pointer and one which verifies the block. There is a couple of tests which is suitable:
* Correct signature
* Correct size (if size of pointee is known)
* data == pointer to check
=== Padding ===
To further protect against various overflows padding can be applied just like the above header was added, both before and after the block. It is also a good idea to add padding pointers to the header. Make sure the padding is set to a fixed value and check the padding when verifying the block. If the pre-padding is overwritten someone else trashed your memory, also this means there is another trashed pointer around with it's post-padding corrupted. If the post-padding is overwritten you (one of your methods or friends) has trashed your memory. This is really good to know, remember we should limit the domain as much as possible.
== Notes ==
<references/>
== External links ==
[http://nevyn.nu/minneshantering/Minneshantering.pdf Lecture slides] (2007-12-11) for the lecture about memory management that I and [http://nevyn.nu nevyn] held at BTH. ([http://svn.sidvind.com/viewvc/skola/trunk/misc/Minneshantering.pdf?view=co Mirror])
[[Category:C/Cpp]]
0f1cfa9105fb86fc6ae97f23f9413e055b845e8f
2152
2150
2007-12-11T17:03:52Z
83.209.20.148
0
New links
wikitext
text/x-wiki
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
__TOC__
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</code>
}}
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
=== Memory blocks ===
A great way of knowing whenever a pointer is a dangling reference or not is to have some custom data before the actual data, a memory header. This requires to overloading of ''operator {{keyword|new}}''. When allocating memory allocate ''sizeof(header_t)'' + the requested size. Cast the allocated memory to a ''header_t'' and fill the values with a predefined signature (can be anything), size should be the originally requested size and data should be a pointer to the first byte '''after''' the header. Remember to return the value of the data pointer, not to the entire block of memory! Another good idea is to clear these values in ''operator delete'' as a dangling reference might have the header intact but the data corrupted.
{{box code|Simple memory block|
<code><cpp/>
typedef struct {
char signature[2];
int size;
void* data;
} header_t;
</code>
}}
Now, once the application crashes and we believe the cause is a dangling reference we can
# Cast the pointer to a char pointer (or any pointer to a datatype which is one byte large)
# Substract sizeof(header_t) from it
# Cast to a header_t
Then one would just see if the values are correct. The above steps is possible to do with gdb but I don't belive it is possible with MSVC. Anyway, it is usually a good idea to write a function which retrieves a header from a pointer and one which verifies the block. There is a couple of tests which is suitable:
* Correct signature
* Correct size (if size of pointee is known)
* data == pointer to check
=== Padding ===
To further protect against various overflows padding can be applied just like the above header was added, both before and after the block. It is also a good idea to add padding pointers to the header. Make sure the padding is set to a fixed value and check the padding when verifying the block. If the pre-padding is overwritten someone else trashed your memory, also this means there is another trashed pointer around with it's post-padding corrupted. If the post-padding is overwritten you (one of your methods or friends) has trashed your memory. This is really good to know, remember we should limit the domain as much as possible.
== Notes ==
<references/>
== External links ==
[http://nevyn.nu/minneshantering/Minneshantering.pdf Lecture slides] (2007-12-11) for the lecture about memory management that I and [http://nevyn.nu nevyn] held at BTH. ([http://svn.sidvind.com/viewvc/skola/trunk/misc/Minneshantering.pdf?view=co Mirror])
65a3982808e8ae50e17db68ecef6784777163d91
2150
2147
2007-12-09T21:32:36Z
EXt
1
Link to lecture slides (well, written in past form even thought the lecture isn't held yet but I'm to lazy to update it afterwards)
wikitext
text/x-wiki
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
__TOC__
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</code>
}}
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
=== Memory blocks ===
A great way of knowing whenever a pointer is a dangling reference or not is to have some custom data before the actual data, a memory header. This requires to overloading of ''operator {{keyword|new}}''. When allocating memory allocate ''sizeof(header_t)'' + the requested size. Cast the allocated memory to a ''header_t'' and fill the values with a predefined signature (can be anything), size should be the originally requested size and data should be a pointer to the first byte '''after''' the header. Remember to return the value of the data pointer, not to the entire block of memory! Another good idea is to clear these values in ''operator delete'' as a dangling reference might have the header intact but the data corrupted.
{{box code|Simple memory block|
<code><cpp/>
typedef struct {
char signature[2];
int size;
void* data;
} header_t;
</code>
}}
Now, once the application crashes and we believe the cause is a dangling reference we can
# Cast the pointer to a char pointer (or any pointer to a datatype which is one byte large)
# Substract sizeof(header_t) from it
# Cast to a header_t
Then one would just see if the values are correct. The above steps is possible to do with gdb but I don't belive it is possible with MSVC. Anyway, it is usually a good idea to write a function which retrieves a header from a pointer and one which verifies the block. There is a couple of tests which is suitable:
* Correct signature
* Correct size (if size of pointee is known)
* data == pointer to check
=== Padding ===
To further protect against various overflows padding can be applied just like the above header was added, both before and after the block. It is also a good idea to add padding pointers to the header. Make sure the padding is set to a fixed value and check the padding when verifying the block. If the pre-padding is overwritten someone else trashed your memory, also this means there is another trashed pointer around with it's post-padding corrupted. If the post-padding is overwritten you (one of your methods or friends) has trashed your memory. This is really good to know, remember we should limit the domain as much as possible.
== Notes ==
<references/>
== External links ==
[http://svn.sidvind.com/viewvc/skola/trunk/misc/Minneshantering.pdf?view=co Lecture slides] (2007-12-11) for the lecture about memory management that I and [http://nevyn.nu nevyn] held at BTH.
102a910b7aa2c8c500eb881c00f3fd8703239164
2147
2146
2007-11-20T01:57:30Z
EXt
1
wikitext
text/x-wiki
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
__TOC__
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</code>
}}
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
=== Memory blocks ===
A great way of knowing whenever a pointer is a dangling reference or not is to have some custom data before the actual data, a memory header. This requires to overloading of ''operator {{keyword|new}}''. When allocating memory allocate ''sizeof(header_t)'' + the requested size. Cast the allocated memory to a ''header_t'' and fill the values with a predefined signature (can be anything), size should be the originally requested size and data should be a pointer to the first byte '''after''' the header. Remember to return the value of the data pointer, not to the entire block of memory! Another good idea is to clear these values in ''operator delete'' as a dangling reference might have the header intact but the data corrupted.
{{box code|Simple memory block|
<code><cpp/>
typedef struct {
char signature[2];
int size;
void* data;
} header_t;
</code>
}}
Now, once the application crashes and we believe the cause is a dangling reference we can
# Cast the pointer to a char pointer (or any pointer to a datatype which is one byte large)
# Substract sizeof(header_t) from it
# Cast to a header_t
Then one would just see if the values are correct. The above steps is possible to do with gdb but I don't belive it is possible with MSVC. Anyway, it is usually a good idea to write a function which retrieves a header from a pointer and one which verifies the block. There is a couple of tests which is suitable:
* Correct signature
* Correct size (if size of pointee is known)
* data == pointer to check
=== Padding ===
To further protect against various overflows padding can be applied just like the above header was added, both before and after the block. It is also a good idea to add padding pointers to the header. Make sure the padding is set to a fixed value and check the padding when verifying the block. If the pre-padding is overwritten someone else trashed your memory, also this means there is another trashed pointer around with it's post-padding corrupted. If the post-padding is overwritten you (one of your methods or friends) has trashed your memory. This is really good to know, remember we should limit the domain as much as possible.
== Notes ==
<references/>
6d117eac15df6c94eed827b1d19eaa3031b30962
2146
2145
2007-11-20T01:51:19Z
EXt
1
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</code>
}}
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
=== Memory blocks ===
A great way of knowing whenever a pointer is a dangling reference or not is to have some custom data before the actual data, a memory header. This requires to overloading of ''operator {{keyword|new}}''. When allocating memory allocate ''sizeof(header_t)'' + the requested size. Cast the allocated memory to a ''header_t'' and fill the values with a predefined signature (can be anything), size should be the originally requested size and data should be a pointer to the first byte '''after''' the header. Remember to return the value of the data pointer, not to the entire block of memory! Another good idea is to clear these values in ''operator delete'' as a dangling reference might have the header intact but the data corrupted.
{{box code|Simple memory block|
<code><cpp/>
typedef struct {
char signature[2];
int size;
void* data;
} header_t;
</code>
}}
Now, once the application crashes and we believe the cause is a dangling reference we can
# Cast the pointer to a char pointer (or any pointer to a datatype which is one byte large)
# Substract sizeof(header_t) from it
# Cast to a header_t
Then one would just see if the values are correct. The above steps is possible to do with gdb but I don't belive it is possible with MSVC. Anyway, it is usually a good idea to write a function which retrieves a header from a pointer and one which verifies the block. There is a couple of tests which is suitable:
* Correct signature
* Correct size (if size of pointee is known)
* data == pointer to check
=== Padding ===
To further protect against various overflows padding can be applied just like the above header was added, both before and after the block. It is also a good idea to add padding pointers to the header. Make sure the padding is set to a fixed value and check the padding when verifying the block. If the pre-padding is overwritten someone else trashed your memory, also this means there is another trashed pointer around with it's post-padding corrupted. If the post-padding is overwritten you (one of your methods or friends) has trashed your memory. This is really good to know, remember we should limit the domain as much as possible.
== Notes ==
<references/>
db9c6f94fcb5eb6c8d20324d56bf15a8dcc64c15
2145
2144
2007-11-20T01:13:17Z
EXt
1
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see if {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow<ref>This is also a security problem: [http://en.wikipedia.org/wiki/Stack_buffer_overflow http://en.wikipedia.org/wiki/Stack_buffer_overflow]</ref>. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
class Foo {
public:
Foo() : fred(NULL) {}
void bar(const char* str){
strcpy(baz, str);
}
private:
char baz[10];
Fred* fred;
};
</code>
}}
What would happen if one would call Foo::bar with a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. The pointer Foo::fred would get a value and probably crash the application, for instance if the destructor were to free the memory held by the pointer.
== Notes ==
<references/>
8b9c3d1a6da23aea20381133d265d6f86df74c01
2144
2143
2007-11-19T23:36:28Z
83.209.20.150
0
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why it happens, but most of the time you won't. The next step is to always try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when/where the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique how to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set the pointer to NULL after being freed if there is a chance it will be accessed again. That is almost always, unless they are freed in a destructor. An uninitialized pointer can point to anything. Such a pointer is called a dangling reference. The same goes for a pointer whose pointee was freed. Accessing a dangling reference in any way will cause a SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see it {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
void foo(const char* str){
char bar[10];
strcpy(bar, str);
}
</code>
}}
What would happen if one would send a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. Aside from trashing the memory this would also suffer from [http://en.wikipedia.org/wiki/Buffer_overflow security related problems].
<references/>
5f2cf97d4cf687142a2a2792a578d7843092db0a
2143
2142
2007-11-19T23:24:36Z
EXt
1
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why happens but most of the time you won't. The next step is always to try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set to NULL after being freed if there is a chance it will be accessed again. That is almost always unless they are freed in a destructor. An uninitialized pointer can point to anything really, such a pointer is called a dangling reference. The same goes to a pointer whose pointee was freed. Accessing a dangling reference in any way caused SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
By making sure that the pointer is NULL unless it points to a valid pointee the next step is to see it {{keyword|this}} is {{keyword|NULL}} or not. If it is there is your problem. It it should have a valid pointee but does not chances are that the memory got corrupted in some way. The most common way is buffer overflow. Take this example for instance:
{{box code|Buffer overflow|
<code><cpp/>
void foo(const char* str){
char bar[10];
strcpy(bar, str);
}
</code>
}}
What would happen if one would send a string whose length is larger than 9 characters? The array would not be large enough to contain all the characters thus it would just keep writing outside of it's space. Aside from trashing the memory this would also suffer from [http://en.wikipedia.org/wiki/Buffer_overflow security related problems].
<references/>
31603b9d8d90a3ab303e3e8e379b54052df161e2
2142
2140
2007-11-19T22:43:59Z
EXt
1
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
Once the bug is reproduceable in a testing environment one might just understand why happens but most of the time you won't. The next step is always to try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing {{keyword|this}} <ref>When accessing instance variables {{keyword|this}} is automatically accessed.</ref> or another pointer is causing the application to crash. The first thing to check is always if the pointer is valid! Later I will explain a technique to quickly check any pointer, but some simpler tips first. Make sure that the pointer in question is initialized to {{keyword|NULL}} (preferably with an initializer list) and set to NULL after being freed if there is a chance it will be accessed again. That is almost always unless they are freed in a destructor. An uninitialized pointer can point to anything really, such a pointer is called a dangling reference. The same goes to a pointer whose pointee was freed. Accessing a dangling reference in any way caused SIGSEGV<ref>Segmentation fault, or access violation in Windows.</ref>.
Secondly
<references/>
af72c8432adfc09d23fc31738f0513396a118c42
2140
2139
2007-11-19T21:59:56Z
EXt
1
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
When the bug is reproduceable in a testing environment one might just understand why happens but most of the time you won't. The next step is always to try to limit the domain. If the application was crashing you already have a smaller domain. Otherwise setting some breakpoints/watchpoints might help to find when the values goes wrong.
== Memory related debugging ==
A common symptom of corrupt memory is when the application crashes randomly and/or when it crashes the debugger breaks at random locations. Another common symptom is when accessing "this" (automatically when accessing instance variables) or another pointer is causing the application to break.
b44a820d752160107b04b502b1c03412a1f7b012
2139
2007-11-19T21:29:35Z
EXt
1
Starting to write about debugging
wikitext
text/x-wiki
== General ==
When debugging it is important to understand the bug you are hunting. Before it can be properly fixed one must understand it completely. The first step is always to find a way to reproduce the bug, unless you are lucky and the application crashed while you were running the debugger. However, most of the time someone else finds the bug and worse, it didn't crash the application, it just caused unexpected behavior.
46261e4d3e411d395cdb063def97776cebbca5eb
Dhcpd on commit
0
1839
3098
3097
2018-09-29T20:16:40Z
EXt
1
wikitext
text/x-wiki
Show how to configure dhcpd to execute a hook on commit (lease added or updated) containing:
* Lease IP (10.0.x.y)
* Client hwaddr (aa:bb:cc:dd:ee:ff)
* Client requested hostname (foo)
* Client DDNS FQDN (foo.example.net.)
It also handles when different subnets have different ddns-domainname and will generate client hostnames with dynamically generated ones if needed.
<codebox lang="text" filename="dhcpd.conf">
# Update DNS (including static leases)
ddns-update-style interim;
update-static-leases on;
ddns-domainname "example.net.";
ddns-rev-domainname "in-addr.arpa.";
# Add a hook which executes when a lease is added or updated
on commit {
# Get the client name from the first of the following:
# 1. Client DHCP Option FQDN
# 2. Client DHCP Option hostname
# 3. Name of static lease (host-decl-name)
# 4. A generated name "dyn-${ip}" where ip is the lease IP with dashes, e.g. "dyn-10-0-1-123"
set clientddns = lcase(pick-first-value (option fqdn.hostname, option host-name, host-decl-name, concat ("dyn-", binary-to-ascii(10,8,"-", leased-address)), ""));
# Get the client dynamic dns domain (different for each subnet)
set clientdomain = config-option server.ddns-domainname;
# Get client hostname only (no generated or static). Used by the hook to show which hostname the client requested.
set clienthost = pick-first-value (option fqdn.hostname, option host-name, "");
# Get lease IP and hwaddr
set clientip = binary-to-ascii(10, 8, ".", leased-address);
set clientmac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
# Update the dynamic hostname (which wont be set unless the client requested one, so update with the generated if needed)
ddns-hostname = clientddns;
# Execute the hook
execute("/path/to/my/hook", "commit", clientip, concat(clientddns, ".", clientdomain), clienthost, clientmac);
}
# Subnet 1
subnet 10.0.1.0 netmask 255.255.255.0 {
ddns-domainname "subnet1.example.net.";
}
# Subnet 2
subnet 10.0.2.0 netmask 255.255.255.0 {
ddns-domainname "subnet2.example.net.";
}
</codebox>
[[Category: Linux]]
[[Category: DHCP]]
87e8752761275afb890c7dc5dcf69873d45a2f6c
3097
2018-09-29T20:16:17Z
EXt
1
Created page with "Show how to configure dhcpd to execute a hook on commit (lease added or updated) containing: * Lease IP (10.0.x.y) * Client hwaddr (aa:bb:cc:dd:ee:ff) * Client requested host..."
wikitext
text/x-wiki
Show how to configure dhcpd to execute a hook on commit (lease added or updated) containing:
* Lease IP (10.0.x.y)
* Client hwaddr (aa:bb:cc:dd:ee:ff)
* Client requested hostname (foo)
* Client DDNS FQDN (foo.example.net.)
It also handles when different subnets have different ddns-domainname and will generate client hostnames with dynamically generated ones if needed.
<codebox lang="text" filename="dhcpd.conf">
# Update DNS (including static leases)
ddns-update-style interim;
update-static-leases on;
ddns-domainname "example.net.";
ddns-rev-domainname "in-addr.arpa.";
# Add a hook which executes when a lease is added or updated
on commit {
# Get the client name from the first of the following:
# 1. Client DHCP Option FQDN
# 2. Client DHCP Option hostname
# 3. Name of static lease (host-decl-name)
# 4. A generated name "dyn-${ip}" where ip is the lease IP with dashes, e.g. "dyn-10-0-1-123"
set clientddns = lcase(pick-first-value (option fqdn.hostname, option host-name, host-decl-name, concat ("dyn-", binary-to-ascii(10,8,"-", leased-address)), ""));
# Get the client dynamic dns domain (different for each subnet)
set clientdomain = config-option server.ddns-domainname;
# Get client hostname only (no generated or static). Used by the hook to show which hostname the client requested.
set clienthost = pick-first-value (option fqdn.hostname, option host-name, "");
# Get lease IP and hwaddr
set clientip = binary-to-ascii(10, 8, ".", leased-address);
set clientmac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
# Update the dynamic hostname (which wont be set unless the client requested one, so update with the generated if needed)
ddns-hostname = clientddns;
# Execute the hook
execute("/path/to/my/hook", "commit", clientip, concat(clientddns, ".", clientdomain), clienthost, clientmac);
}
# Subnet 1
subnet 10.0.1.0 netmask 255.255.255.0 {
ddns-domainname "subnet1.example.net.";
}
# Subnet 2
subnet 10.0.2.0 netmask 255.255.255.0 {
ddns-domainname "subnet2.example.net.";
}
</codebox>
c8e6a1c3830d744592b9868bd9ab466e68688149
Extensions/Youtube
0
1585
2654
2653
2012-02-01T22:36:12Z
EXt
1
wikitext
text/x-wiki
<codebox lang="php" filename="youtube.php">
<?php
# YouTube Videos
#
# Tag:
# <youtube>v</youtube>
# Ex:
# from url http://www.youtube.com/watch?v=WZpeeRSk-0A
# <youtube>WZpeeRSk-0A</youtube>
$wgExtensionFunctions[] = 'wfYouTube';
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'YouTube',
'version' => '1.0',
'author' => 'David Sveningsson',
'description' => 'Display YouTube video (based on [http://www.mediawiki.org/wiki/Extension:YouTube_(Iubito) Sylvain Macheferts extension].)',
'url' => 'https://sidvind.com/wiki/Extensions/Youtube');
function wfYouTube() {
global $wgParser;
$wgParser->setHook('youtube', 'renderYouTube');
}
function youtubeError($str){
return "<div style=\"border: solid red 1px; padding: .5em;\">$str</div>";
}
function renderYouTube($input, array $args, Parser $parser, PPFrame $frame) {
/* default size (small) */
$width = 560;
$height = 315;
/* default props */
$frame = isset($args['frame']);
/* parse size argument */
if ( isset($args['size']) ){
$size = strtolower($args['size']);
if ( strcmp($size, "tiny") == 0 ) { $width = 320; $height = 180; }
else if ( strcmp($size, "small") == 0 ) { $width = 560; $height = 315; }
else if ( strcmp($size, "medium") == 0 ) { $width = 640; $height = 360; }
else if ( strcmp($size, "large") == 0 ) { $width = 853; $height = 480; }
else if ( strcmp($size, "huge") == 0 ) { $width = 1280; $height = 720; }
else if ( sscanf($size, "%dx%d", $width, $height) != 2 ){
return youtubeError("invalid size (valid sizes are <tt>tiny</tt>, <tt>small</tt>, <tt>medium</tt>, <tt>large</tt>, <tt>huge</tt>, <tt>WxH</tt>)");
}
}
/* validate the video ID */
if ( preg_match('%[^A-Za-z0-9_\\-]%', $input) ) {
return youtubeError('bad video ID');
}
/* video element */
$url = "https://www.youtube-nocookie.com/embed/{$input}?rel=0";
$video = Xml::openElement('iframe', array('width'=>$width, 'height'=>$height, 'src'=>$url, 'frameborder'=>0, "style"=>"float: left", 'allowfullscreen')) . Xml::closeElement('iframe');
/* caption */
$caption = '';
if ( isset($args['caption']) ){
$caption = Xml::openElement('div', array('class'=>'thumbcaption')) .
$parser->recursiveTagParse($args['caption']) .
Xml::closeElement('div');
}
if ( $frame ){
return
Xml::openElement('div', array('class'=>'thumb tright')) .
Xml::openElement('div', array('class'=>'thumbinner')) .
$video . $caption .
Xml::closeElement('div') .
Xml::closeElement('div');
} else {
return $video;
}
}
</codebox>
[[Category: MediaWiki]]
[[Category: Extension]]
db8ee67cb9b9c2d967c1511f684b1e33af1dfcec
2653
2012-02-01T22:27:52Z
EXt
1
Created page with "<codebox lang="php" filename="youtube.php"> <?php # YouTube Videos # # Tag: # <youtube>v</youtube> # Ex: # from url http://www.youtube.com/watch?v=WZpeeRSk-0A # <youtube>WZ..."
wikitext
text/x-wiki
<codebox lang="php" filename="youtube.php">
<?php
# YouTube Videos
#
# Tag:
# <youtube>v</youtube>
# Ex:
# from url http://www.youtube.com/watch?v=WZpeeRSk-0A
# <youtube>WZpeeRSk-0A</youtube>
$wgExtensionFunctions[] = 'wfYouTube';
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'YouTube',
'version' => '1.0',
'author' => 'David Sveningsson',
'description' => 'Display YouTube video (based on [http://www.mediawiki.org/wiki/Extension:YouTube_(Iubito) Sylvain Macheferts extension].)',
'url' => 'https://sidvind.com/wiki/Extensions/Youtube');
function wfYouTube() {
global $wgParser;
$wgParser->setHook('youtube', 'renderYouTube');
}
function youtubeError($str){
return "<div style=\"border: solid red 1px; padding: .5em;\">$str</div>";
}
function renderYouTube($input, array $args, Parser $parser, PPFrame $frame) {
/* default size (small) */
$width = 560;
$height = 315;
/* default props */
$frame = isset($args['frame']);
/* parse size argument */
if ( isset($args['size']) ){
$size = strtolower($args['size']);
if ( strcmp($size, "tiny") == 0 ) { $width = 320; $height = 180; }
else if ( strcmp($size, "small") == 0 ) { $width = 560; $height = 315; }
else if ( strcmp($size, "medium") == 0 ) { $width = 640; $height = 360; }
else if ( strcmp($size, "large") == 0 ) { $width = 853; $height = 480; }
else if ( strcmp($size, "huge") == 0 ) { $width = 1280; $height = 720; }
else if ( sscanf($size, "%dx%d", $width, $height) != 2 ){
return youtubeError("invalid size (valid sizes are <tt>tiny</tt>, <tt>small</tt>, <tt>medium</tt>, <tt>large</tt>, <tt>huge</tt>, <tt>WxH</tt>)");
}
}
/* validate the video ID */
if ( preg_match('%[^A-Za-z0-9_\\-]%', $input) ) {
return youtubeError('bad video ID');
}
/* video element */
$url = "https://www.youtube-nocookie.com/embed/{$input}?rel=0";
$video = Xml::openElement('iframe', array('width'=>$width, 'height'=>$height, 'src'=>$url, 'frameborder'=>0, "style"=>"float: left", 'allowfullscreen')) . Xml::closeElement('iframe');
/* caption */
$caption = '';
if ( isset($args['caption']) ){
$caption = Xml::openElement('div', array('class'=>'thumbcaption')) .
$parser->recursiveTagParse($args['caption']) .
Xml::closeElement('div');
}
if ( $frame ){
return
Xml::openElement('div', array('class'=>'thumb tright')) .
Xml::openElement('div', array('class'=>'thumbinner')) .
$video . $caption .
Xml::closeElement('div') .
Xml::closeElement('div');
} else {
return $video;
}
}
</codebox>
3d76ee283e3491a40bfd07d63770389d90504c48
GCC/Function alias
0
1586
2656
2012-02-06T16:23:02Z
EXt
1
Created page with "Under gcc you can create function aliases using the attribute <tt>alias</tt>. uint64_t htobe64(uint64_t val) __attribute__((weak, alias ("_int_htobe64"))); This will create a..."
wikitext
text/x-wiki
Under gcc you can create function aliases using the attribute <tt>alias</tt>.
uint64_t htobe64(uint64_t val) __attribute__((weak, alias ("_int_htobe64")));
This will create an additional symbol to be emitted. For c++ the mangled name must be provided.
[[Category: gcc]]
6aae076961441eea3441e2f37466a83590675e41
GRUB: Boot another OS once
0
1385
2610
2408
2012-01-27T12:52:27Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
As I've understood some distributions (e.g. opensuse and other rpm-based) ship a tool called "grubonce" which "should" replace grub-set-default (method 2), however it is not part of grub and is merely a wrapper script. It does the same thing as "echo --once | grub --batch" except method 1 works on all grub installations.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
[[Category:Grub]]
77c8da754bf9edb9bb52ce2feadd6e08095711fd
2408
2407
2010-10-24T20:40:38Z
EXt
1
notice about grubonce
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
As I've understood some distributions (e.g. opensuse and other rpm-based) ship a tool called "grubonce" which "should" replace grub-set-default (method 2), however it is not part of grub and is merely a wrapper script. It does the same thing as "echo --once | grub --batch" except method 1 works on all grub installations.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
fa73f5c481d4148ea71a6c75b7ed889ed27f31f3
2407
2405
2010-10-24T20:15:28Z
EXt
1
undo cruft added by 84.130.168.212
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
ce2a1fcbc665e4ad1fa0fe3e3ef006fb1d00c969
2405
2404
2010-10-24T15:44:41Z
84.130.168.212
0
/* Renew this Article */
wikitext
text/x-wiki
== Renew this Article ==
Hi there,
please re-write this article, because it is old in any way.
Have a look at the command
grubonce
This is the preferred way to reboot into another installed OS for just the next reboot.
:-)
Greetings
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
7eb4873dce2431fbd9f92c0b5e701e0fdb0ba29e
2404
2403
2010-10-24T15:44:13Z
84.130.168.212
0
wikitext
text/x-wiki
== Renew this Article ==
Hi there,
please re-weite this article, because it is old in any way.
Have a look at the command
grubonce
This is the preferred way to reboot into another installed OS for just the next reboot.
:-)
Greetings
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
efca88b8685cc412728e3dce7e6d5e6318763397
2403
2363
2010-09-20T10:29:07Z
79.144.94.251
0
grow up a bit.
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a Windows system for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
ce2a1fcbc665e4ad1fa0fe3e3ef006fb1d00c969
2363
2362
2010-04-30T16:31:23Z
193.119.18.3
0
/* Sample: Alternate between two entrys */ another silly typo
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entries ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
2a362a8096e46fae55448e223065613a510cc349
2362
2337
2010-04-30T16:30:38Z
193.119.18.3
0
/* Sample: Alternate between to entrys */ fixed trivial typo "two" vs. "to"
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between two entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
123f1bbc140d4d2c376ee9cc8fef5e374251e4bd
2337
2054
2009-10-17T11:58:37Z
188.27.122.217
0
/* Sample */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default saved
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
e3653691d9abc9f813a6892d408db7fa4ee8bd6e
2054
2035
2006-09-24T18:47:51Z
EXt
1
Restructured a bit
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Method 1 (preferred) ==
In some newer versions of GNU/Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). While some distributions like Gentoo still has {{Filename|/sbin/grub-set-default}}, this method is preferred. With this method you don't need to edit {{Filename|/boot/grub/menu.lst}}, or anything else either.
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
When you reboot your computer (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
=== Sample ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
== Method 2 (deprecated) ==
This method is deprecated and won't work on some distributions.
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
=== Changing the default settings from a script ===
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. GRUB can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
=== Make GRUB restore to the primary OS ===
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when GRUB starts that entry it changes the default entry to 1.
=== Sample: Normally boot GNU/Linux ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Sample: Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
9720871e02ce884cf43a1d35e79519897060220d
2035
2034
2006-08-28T21:32:01Z
Thiemel
6
/* Make grub restore to the primary OS */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC ('''echo "savedefault --default=2 --once" | grub --batch; reboot'''), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
8b25567707a890693eab1b6ebb9afd2e343e38e2
2034
2033
2006-08-28T21:30:55Z
Thiemel
6
/* Make grub restore to the primary OS */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
6c20e2467803304c01ca8b643354343da01027d0
2033
2032
2006-08-28T21:28:18Z
Thiemel
6
/* '''Update'''(2006/08): Config from a person, who made updates */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC, after previous two commands (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
413db79f9b9ed79f0d21008247a9494bec6e2e8f
2032
2031
2006-08-28T21:27:55Z
Thiemel
6
/* '''Update'''(2006/08): Config from a person, who made updates */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC, after previous two commands (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
f7c99fddce8a8fcaa2e7d576ff97755a48a49a5f
2031
2030
2006-08-28T21:27:22Z
Thiemel
6
/* '''Update'''(2006/08): Config from a person, who made updates */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC, after previous two commands (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive
</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
80d0566643c7ad45e9f2025430ae481738b094aa
2030
2029
2006-08-28T21:26:01Z
Thiemel
6
/* Samples */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC, after previous two commands (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== '''Update'''(2006/08): Config from a person, who made updates ===
{{Box file|/boot/grub.conf|<pre><nowiki>
#boot=/dev/hdb
default 0
timeout 1
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
# VESA VGA:
# vga=0x317 - 1024x768
# vga=0x31A - 1280x1024
title Fedora Core (2.6.15.7-ViaEpiaSP13000)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.7-ViaEpiaSP13000 ro root=/dev/hdb1 quiet vga=0x31A
initrd /boot/initrd-2.6.15.7-ViaEpiaSP13000.img
title Fedora Core (2.6.17-1.2174_FC5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/hdb1 quiet rhgb vga=0x317
initrd /boot/initrd-2.6.17-1.2174_FC5.img
title Wintendo
rootnoverify (hd0,3)
chainloader +1
makeactive
</nowiki></pre>
}}
'''Update'''(2006/08): '''There is no sure, next two examples will work!''' So you should skip following text :-\
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
1a6e8452018b20ea0beaf4241ed763251a553453
2029
2028
2006-08-28T21:16:31Z
Thiemel
6
/* Make grub restore to the primary OS */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
'''Update'''(2006/08): When you reboot your PC, after previous two commands (echo "savedefault --default=2 --once" | grub --batch; reboot), GRUB will bypass (only once) "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, and boot to your selected OS. After next reboot, GRUB will use "timeout" and "default" settings from {{Filename|/boot/grub.conf}}, again.
'''Update'''(2006/08): Theoreticaly, you don't need to edit your {{Filename|/boot/grub.conf}}, so you can skip following text :-)
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
37a81f65a1e51d6c8da946e65220f6eb533d3b72
2028
2027
2006-08-28T21:05:11Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
10f27dde68d04403f49a3ac8b522447a997e2680
2027
2026
2006-08-28T21:04:26Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update'''(2006/08): You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
086924ca8e8c558c12c2c409d0aafd4a355f8510
2026
2025
2006-08-28T21:03:59Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update'''(2006/08): In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update'''(2006/08): You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update: You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
a49b22017c849352ae35e8279bf3cc34ae8e7a1d
2025
2024
2006-08-28T21:02:40Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
'''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update: You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update: You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
0d5108ca4b63987445d2435b6830343925bf8e9d
2024
2023
2006-08-28T21:01:49Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update: You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update: You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
b05070e72014ec1628d1788f11098be8ba4a256c
2023
2022
2006-08-28T21:00:47Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''Update: You can skip following text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update: You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
b5e8568bb9aacc22f11527949597a2899c986a2d
2022
2021
2006-08-28T21:00:17Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''Update: You can skip following text'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
37820edd884dadf0a78fe341a4e88485503d44ce
2021
2020
2006-08-28T20:59:37Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}.'''
'''You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''You can skip following text:'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
6d6ac49a7259d3eaba68698b0156fca88296a43a
2020
2019
2006-08-28T20:59:07Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}. You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''You can skip following text:'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
4db04ce537a1e193dc9c21c2fbd23df8415df349
2019
2018
2006-08-28T20:58:11Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}. You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|<pre><nowiki>
[root@localhost ~]# echo "savedefault --default=2 --once" | grub --batch
[root@localhost ~]# reboot</nowiki></pre>
}}
Remember to replace "2" to match your own config!
'''You can skip following text:'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
78b24a8de69ffad0f65e0722c370050f87a89434
2018
2017
2006-08-28T20:51:08Z
Thiemel
6
/* Changing the default settings from a script */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}. You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
'''Update:''' In newer versions of GNU Linux, there is no /sbin/grub-set-default (eg. Debian 3.1, Fedora Core 4,5).
To reboot to another OS, you need to type this:
{{Box code|Updated: Restart system to another OS|
[root@localhost ~]# echo "savedefault --default=2 --once"|grub --batch
[root@localhost ~]# reboot
}}
Remember to replace "2" to match your own config!
'''You can skip following text:'''
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
c469c929b91f302994d8c7bac2a0dbc7080af43a
2017
2016
2006-08-28T20:45:39Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}. You can skip following text:'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
2408f3bea07f3db6e3408598b872a39ab6f35c1c
2016
2015
2006-08-28T20:45:07Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}. You can skip next text'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
accc5d794482ffcd9ad4969da5d322263f915796
2015
2014
2006-08-28T20:43:33Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5). '''You do not need to edit your {{Filename|/boot/grub/menu.lst}}'''
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
3c221020f775f3f2d7d66414bd6fc0e9ce8cf404
2014
1988
2006-08-28T20:38:25Z
Thiemel
6
/* Getting grub to read default choice from file */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
'''Update:''' In newer versions of GNU Linux, there is no {{Filename|/sbin/grub-set-default}} (eg. Debian 3.1, Fedora Core 4,5).
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
55db14acb7a583606b3f5a05e270a6e0a5fe0488
1988
1944
2006-07-31T18:18:49Z
EXt
1
/* Make grub restore to the primary OS */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
227f984a8891621ff503f400efdc534226458f6b
1944
1943
2006-07-14T14:19:55Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
6e3086ae72280e4d0dd067eabd26d28f5ec88b49
1943
1942
2006-07-14T14:18:54Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
<nowiki>kernel /kernel-backup root=/dev/hdb3</nowiki>
title Gentoo Linux
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
<nowiki>title=Memtest86</nowiki>
root (hd1,0)
<nowiki>kernel /memtest86/memtest.bin</nowiki>
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
<nowiki>kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1</nowiki>
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
2e5e3309b8991420dbbca1930c6d57995a964520
1942
1941
2006-07-14T14:03:31Z
EXt
1
/* Sample */
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Samples ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
kernel /kernel-backup root=/dev/hdb3
title Gentoo Linux
root (hd1,0)
kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
title=Memtest86
root (hd1,0)
kernel /memtest86/memtest.bin
}}
=== Alternate between to entrys ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
7e4e940cf6653cc76e9382795950e4c86c8325bf
1941
1940
2006-07-14T14:02:22Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
== Sample ==
=== My config ===
{{Box file|/boot/grub.conf|
timeout 5
default saved
color black/white
splashimage /boot/grub/splash.xpm.gz
fallback 0
title Gentoo Linux (backup)
root (hd1,0)
kernel /kernel-backup root=/dev/hdb3
title Gentoo Linux
root (hd1,0)
kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
title=Memtest86
root (hd1,0)
kernel /memtest86/memtest.bin
}}
=== Alternate between to entrys ===
timeout 5
default saved
title Gentoo Linux
savedefault 1
root (hd1,0)
kernel /kernel-2.6 root=/dev/hdb3 quiet video=vesafb:ywrap,mtrr,1024x768-32@70 splash=silent,fadein,theme:NewLinux CONSOLE=/dev/tty1
initrd /fbsplash-linux-1024x768
title Wintendo
savedefault 0
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
c3f3a4ac6e165d1a43804b51785ccfeba471ece9
1940
1935
2006-07-14T13:59:27Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
Edit the {{Filename|/boot/grub.conf}} ({{Filename|/boot/grub/menu.lst}} on some systems) and change "default" to "saved". I'm using the following settings:
{{Box file|/boot/grub.conf|
timeout 5
default saved
fallback 0
}}
Note: To make this work you have to run {{Filename|/sbin/grub-set-default}} followed by the entry you wish to use as default before you restart the system.
== Changing the default settings from a script ==
This is really simple, either just run {{Filename|/sbin/grub-set-default}} to change or use a small wrapper like this:
{{Box code|Restart system to another OS|
#!/bin/bash
grub-set-default 2
reboot
}}
{{Filename|/sbin/grub-set-default}} creates the file {{Filename|/boot/grub/default}} containing which OS to start. Grub can change this from it's shell and thus when the bootscreen appears. Remember to replace "2" to match your own config!
== Make grub restore to the primary OS ==
Edit {{Filename|/boot/grub.conf}} to run savedefault when starting Windows.
{{Box file|/boot/grub.conf|
title Wintendo
savedefault 1
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1
makeactive
}}
That should do it. Now running the script changes the default entry to 2 (Wintendo) and when Grub starts that entry it changes the default entry to 1.
0481248c10ba90e24ed840233615e062c7c43f4f
1935
2006-07-14T13:37:51Z
EXt
1
wikitext
text/x-wiki
== Description ==
If you like me have GNU/Linux as the primary OS and a [http://www.catb.org/~esr/jargon/html/W/Wintendo.html Wintendo] for gaming you sometimes have to reboot the system and wait for grub to start. Once grub has started you have a couple of seconds to change to Windows or GNU/Linux will boot. As I often don't feel like waiting while the system reboots I do something else and misses grub and have to reboot again. This guide will tell you how to make grub start windows upon the next reboot only and how to use this method to do other similar tasks like toogle OS upon restart.
== Getting grub to read default choice from file ==
483bd89ba55d46a466b198fbb6987dadcc5a305d
GRUB: Password protection
0
1402
2609
1994
2012-01-27T12:51:37Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
You can load new entries when you typed the correct password. Just specify the name to the new menu after the 'password' command. After typing the password grub will reload itself with the new file.
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD admin.conf
}}
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
== Links ==
* [http://www.gnu.org/software/grub/manual/grub.html http://www.gnu.org/software/grub/manual/grub.html] ([http://www.gnu.org/software/grub/manual/grub.html#password password], [http://www.gnu.org/software/grub/manual/grub.html#lock lock], [http://www.gnu.org/software/grub/manual/grub.html#md5crypt md5crypt])
[[Category:Grub]]
0c54222a8a7f00ce92f0c53a320bb0416ced5f3f
1994
1993
2006-07-31T20:44:22Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
You can load new entries when you typed the correct password. Just specify the name to the new menu after the 'password' command. After typing the password grub will reload itself with the new file.
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD admin.conf
}}
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
== Links ==
* [http://www.gnu.org/software/grub/manual/grub.html http://www.gnu.org/software/grub/manual/grub.html] ([http://www.gnu.org/software/grub/manual/grub.html#password password], [http://www.gnu.org/software/grub/manual/grub.html#lock lock], [http://www.gnu.org/software/grub/manual/grub.html#md5crypt md5crypt])
41522d4f368bc4efccbd69a177be9c274fe29eec
1993
1992
2006-07-31T20:30:24Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
You can load new entries when you typed the correct password. Just specify the name to the new menu after the 'password' command. After typing the password grub will reload itself with the new file.
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD admin.conf
}}
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
== Links ==
* [http://www.gnu.org/software/grub/manual/grub.html http://www.gnu.org/software/grub/manual/grub.html]
3d0945a7022df20228fff0b759a70f59aa667a0a
1992
1991
2006-07-31T20:29:59Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
You can load new entries when you typed the correct password. Just specify the name to the new menu after the 'password' command. After typing the password grub will reload itself with the new file.
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD admin.conf
}}
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
== Links ==
* [http://www.gnu.org/software/grub/manual/grub.html]
d9f7d085081ea8e57c144dff39688af5ec574d73
1991
1990
2006-07-31T20:24:11Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
You can load new entries when you typed the correct password. Just specify the name to the new menu after the 'password' command. After typing the password grub will reload itself with the new file.
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD admin.conf
}}
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
6f1c3fc768e1f50e0a5ded763b4cafe90493ccfc
1990
2006-07-31T20:14:52Z
EXt
1
wikitext
text/x-wiki
== Protect entries from being editing ==
=== Plain text passwords ===
To protect grub with a password put the command 'password YOUR_PASSWORD' somewhere in the beginning of {{filename|/boot/grub/grub.conf}}, like this:
{{Box file|/boot/grub/grub.conf|
password YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
This will disable all the options except 'boot' unless you press 'p' to enter the password. But if you have clever users they figure of the password quite easy by booting the OS and reading the password.
=== Encrypted passwords ===
{{Box file|/boot/grub/grub.conf|
password --md5 MD5_SUM_OF_YOUR_PASSWORD
timeout 10
default saved
.
.
.
}}
As you can see in the sample it is similar to the last sample except we specified "--md5" and wrote the checksum instead of the plaintext one. To get the md5 checksum of the password you can start the grub command-line tool and run 'md5'
{{Box code|Example|
# grub
grub> md5
Password: ***
Encrypted: $1$XUSFY1$bl73sNsg5vIKj//qCHvv3
}}
=== Loading a new menu ===
== Protect entries from being booted ==
The 'lock' command will fail until a valid password has been entered. If the user hasn't entered one he/she won't be able to continue the execution of the entry. Place it right after the 'title' command
{{Box file|/boot/grub/grub.conf|
title Password protected OS
lock
root (hd0,0)
kernel /kernel
}}
Also note that this is useless unless the 'password' command is used.
7bb45c0c940a836f791cb24288aebd875ef39867
GRUB: Recover root password
0
1491
2607
2315
2012-01-27T12:50:56Z
EXt
1
wikitext
text/x-wiki
Append "1 init=/bin/bash" to grub kernel entry to boot into single user mode.
{{Box code|Remount root partition|
# mount -t proc proc /proc
# mount -o remount,rw /
}}
Change password using passwd.
[[Category:Grub]]
abd0dc3927a7d46eac2389a4797b06b718a33076
2315
2009-02-23T18:38:28Z
EXt
1
New page: Append "1 init=/bin/bash" to grub kernel entry to boot into single user mode. {{Box code|Remount root partition| # mount -t proc proc /proc # mount -o remount,rw / }} Change password u...
wikitext
text/x-wiki
Append "1 init=/bin/bash" to grub kernel entry to boot into single user mode.
{{Box code|Remount root partition|
# mount -t proc proc /proc
# mount -o remount,rw /
}}
Change password using passwd.
e4d604f360edccf89ab0cc1583abfbd1b48b0790
GRUB: Restore GRUB
0
1369
2616
2612
2012-01-27T12:56:14Z
EXt
1
moved [[Grub: Restore GRUB]] to [[GRUB: Restore GRUB]]: derp
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems with linux and grub reporting the drives in a different order?
Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my boot partition?
How do I know which partition holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate boot partition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate boot partition we need to specify the full path but with /boot as base.
[[Category:Grub]]
71e241b01f23fdf996a2bf828e2a5bb03b977f64
2612
2611
2012-01-27T12:53:51Z
EXt
1
moved [[HOWTO Restore GRUB after Windows XP installation-cd]] to [[Grub: Restore GRUB]]: Consistent naming
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems with linux and grub reporting the drives in a different order?
Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my boot partition?
How do I know which partition holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate boot partition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate boot partition we need to specify the full path but with /boot as base.
[[Category:Grub]]
71e241b01f23fdf996a2bf828e2a5bb03b977f64
2611
2347
2012-01-27T12:52:42Z
EXt
1
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems with linux and grub reporting the drives in a different order?
Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my boot partition?
How do I know which partition holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate boot partition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate boot partition we need to specify the full path but with /boot as base.
[[Category:Grub]]
71e241b01f23fdf996a2bf828e2a5bb03b977f64
2347
2345
2010-01-14T20:14:22Z
68.53.186.151
0
/* How to find out which drive grub should use */
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems with linux and grub reporting the drives in a different order?
Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my boot partition?
How do I know which partition holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate boot partition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate boot partition we need to specify the full path but with /boot as base.
d030087f7a5a31a3130ccb51b9183dfe046408b9
2345
2326
2010-01-12T18:00:59Z
68.53.186.151
0
/* How to find out which drive grub should use */
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems with linux and grub reporting the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
3c7f84d15241c513de21f3d7993916537dffc46c
2326
2320
2009-05-15T12:15:34Z
80.187.105.125
0
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
0600df904b717727fb3bc8d181a1ab70e022389b
2320
2318
2009-03-17T13:48:37Z
128.243.220.41
0
fix typo. Nice site!
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-floppy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
fbe476f7b248c397fb974653b5a0e8d50f8bf19d
2318
2317
2009-03-04T17:54:44Z
EXt
1
Undo revision 2317 by [[Special:Contributions/76.194.9.64|76.194.9.64]] ([[User talk:76.194.9.64|Talk]])
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
56e443e3ebf3e61323613d8d735794415ea98f5c
2317
2287
2009-03-04T03:32:53Z
76.194.9.64
0
/* How to find out which drive grub should use */
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
NOTE: This doesn't work and XP WILL NOT BOOT, AUTHOR IS OBVIOUSLY TALKING OUT THEIR ASS AND HAS NEVER ACTUALLY DONE THIS.
52b5fefc1f44d877c2bbf73e167a080937c0de21
2287
1389
2008-11-28T21:55:50Z
142.103.8.54
0
/* How to find out which drive grub should use */
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you can see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
56e443e3ebf3e61323613d8d735794415ea98f5c
1389
1388
2006-05-06T19:37:13Z
194.47.157.189
0
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
# chroot into the partition
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
# Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
# exit out of the chrooted envirioment and reboot
# exit
# reboot
=== Summary ===
Boot with a livecd, login as root
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
# mount /dev/hda1 /mnt/foo/boot
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
# grub-install
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
# exit
# reboot
=== How to find out which drive grub should use ===
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you kan see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
1c0ff2e2e5f9399d6c7c02592580a7d1406cc037
1388
1383
2006-05-06T19:34:21Z
194.47.157.189
0
wikitext
text/x-wiki
=== Description ===
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
# Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
# Mount appropriate partition
<code>
<sh/>
# mkdir /mnt/foo
# mount /dev/hda2 /mnt/foo
</code>
If you have a sepecial bootpartition you should also mount that one now.
<code>
<sh/>
# mount /dev/hda1 /mnt/foo/boot
</code>
# chroot into the partition
<code>
<sh/>
# mount -t proc none /mnt/foo/proc
# chroot /mnt/foo /bin/bash
</code>
# run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
5. Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
6. exit out of the chrooted envirioment and reboot
# exit # reboot
Summary
Boot with a livecd, login as root # mkdir /mnt/foo # mount /dev/hda2 /mnt/foo # mount /dev/hda1 /mnt/foo/boot # mount -t proc none /mnt/foo/proc # chroot /mnt/foo /bin/bash # grub-install grub> root (hd0,0) grub> setup (hd0) grub> quit # exit # reboot
How to find out which drive grub should use
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you kan see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
ca49543216721f29f2618a650a482e1c910e147b
1383
2006-05-06T14:15:54Z
EXt
1
wikitext
text/x-wiki
Description
Booting with a Windows XP installations cd means that the bootsector gets overwritten and thus grub won't boot any longer. This article describes how to reinstall grub into the bootsector.
Quick steps:
1. Boot with a livecd. Make sure to login as root. In this example I use the Gentoo 2005.1 livecd (universal installation cd).
2. Mount appropriate partition
# mkdir /mnt/foo # mount /dev/hda2 /mnt/foo
If you have a sepecial bootpartition you should also mount that one now.
# mount /dev/hda1 /mnt/foo/boot
3. chroot into the partition
# mount -t proc none /mnt/foo/proc # chroot /mnt/foo /bin/bash
4. run grub
# grub --no-floppy
Use --no-flopy to skip probing for floppydrives. Alternative you could run grub-install here and skip the next step.
5. Install grub on the bootsector.
grub> root (hd0,0) grub> setup (hd0) grub> quit
root points to the drive and partition that contains the boot-directory and setup points to the drive that grub should be installed into.
6. exit out of the chrooted envirioment and reboot
# exit # reboot
Summary
Boot with a livecd, login as root # mkdir /mnt/foo # mount /dev/hda2 /mnt/foo # mount /dev/hda1 /mnt/foo/boot # mount -t proc none /mnt/foo/proc # chroot /mnt/foo /bin/bash # grub-install grub> root (hd0,0) grub> setup (hd0) grub> quit # exit # reboot
How to find out which drive grub should use
Having problems that linux and grub reports the drives in a different order? Grub maintains a list of what a linux drive would be in grub. Look at /boot/grub/device.map once you booted the system. In case you need to know when you booted using the livecd, just look at the same directory but on the mounted partition.
# less /boot/grub/device.map (hd0) /dev/hda
As you kan see the file first tells us the drive as grub reports it and then how linux would. Here the drives are listed in a correct order but using IDE-controller card etc can make the orders a bit confusing.
Where is my bootpartition?
How do I know which partition that holds my bootfiles? Grub has a simple command to find it.
grub> find /boot/grub/stage1 (hd0,0)
If it won't return anything you might have a separate bootpartition, so try this instead.
grub> find /grub/stage1 (hd0,1)
Grub just looks at the partition and checks if it can find the file you asked for. It won't look recursive so we need to specify the full path. In case you have a separate bootpartition we need to specify the full path but with /boot as base.
716645139eb883b28bda6e5b13e2fbc2e22f8302
Gentoo/Applying patches
0
1833
3048
2015-08-09T12:11:55Z
EXt
1
Created page with "== Apply custom patches to ebuilds == Depending on the package you can apply custom patches without modifying the ebuild by dropping {{Filename|.patch}}-files in {{Filename|<..."
wikitext
text/x-wiki
== Apply custom patches to ebuilds ==
Depending on the package you can apply custom patches without modifying the ebuild by dropping {{Filename|.patch}}-files in {{Filename|<nowiki>/etc/portage/patches/${CATEGORY}/${P}</nowiki>}} where <nowiki>${P}</nowiki> can also contain both versions and slots:
* /etc/portage/patches/dev-lang/python
* /etc/portage/patches/dev-lang/python:3.4
* /etc/portage/patches/dev-lang/python-3.4.2
For this to work the ebuild must call <tt>epatch_user</tt> in <tt>src_prepare</tt>. In case the ebuild doesn't you can force it by utilizing {{Filename|/etc/portage/bashrc}} (globally) or {{Filename|<nowiki>/etc/portage/env/...</nowiki>}} (per package) to force calling <tt>epatch_user</tt> in the <tt>post_src_prepare</tt> hook (see [http://blog.yjl.im/2014/05/using-epatchuser-to-patch-gentoo.html blog.yjl.im] for details)
* https://wiki.gentoo.org/wiki//etc/portage/patches
* http://blog.yjl.im/2014/05/using-epatchuser-to-patch-gentoo.html
[[Category:Linux]]
[[Category:Gentoo]]
287351ca4cf470cfb69aa4dff26bccf16e63c461
Gentoo/Oneliners
0
1489
2602
2316
2012-01-27T12:47:01Z
EXt
1
wikitext
text/x-wiki
{{Box code|List all packages installed in overlays|
eix --installed-in-some-overlay
}}
{{Box code|List all packages installed the specified overlay|
eix --installed-from-overlay FOO
}}
[[Category:Gentoo]]
7b82483807525c6f3545e05b80362a8a165a4325
2316
2309
2009-03-02T19:02:09Z
EXt
1
wikitext
text/x-wiki
{{Box code|List all packages installed in overlays|
eix --installed-in-some-overlay
}}
{{Box code|List all packages installed the specified overlay|
eix --installed-from-overlay FOO
}}
5b67d6d2901a9c32d69f6488e247db9a4ef0cb53
2309
2009-02-12T18:01:09Z
EXt
1
New page: {{Box code|List all packages installed in overlays (/usr/local/portage)| equery list -i -o }}
wikitext
text/x-wiki
{{Box code|List all packages installed in overlays (/usr/local/portage)|
equery list -i -o
}}
ebb17e871dbd455a3bc9d600fa4048abc56e45dc
Gentoo/Portage
0
1583
2649
2648
2012-01-30T19:18:42Z
EXt
1
wikitext
text/x-wiki
== Per-package settings ==
=== Enviroment flags only (CFLAGS, LINGUAS, etc) ===
<codebox title="/etc/portage/package.env" lang="text">
x11-libs/qt-webkit nodebug.conf
</codebox>
<codebox title="/etc/portage/env/nodebug.conf" lang="text">
CFLAGS="-march=native -Os -pipe -msse3"
CXXFLAGS="${CFLAGS}"
</codebox>
Uses the same format as make.conf(5)
=== Alternative ===
Create {{Filename|bashrc}} in {{Filename|/etc/portage/env/${CATEGORY}/<nowiki>${PN}</nowiki>}} with the custom environment.
= Environmental variables =
== EXTRA_ECONF / EXTRA_EMAKE ==
Pass extra flags to econf (configure) and emake (make):
EXTRA_ECONF="--disable-silent-rules" emerge -v1 foobar
a3f8411edfbdfeb870dae00816435faa161f2655
2648
2012-01-30T13:04:13Z
EXt
1
Created page with "= Environmental variables = == EXTRA_EMAKE == == EXTRA_ECONF == Pass extra flags to econf (configure): EXTRA_ECONF="--disable-silent-rules" emerge -v1 foobar"
wikitext
text/x-wiki
= Environmental variables =
== EXTRA_EMAKE ==
== EXTRA_ECONF ==
Pass extra flags to econf (configure):
EXTRA_ECONF="--disable-silent-rules" emerge -v1 foobar
cceeee3f1e2f2dd4ccb613c815deeb4abe602a95
Gentoo masked packages
0
1421
2603
2093
2012-01-27T12:47:17Z
EXt
1
wikitext
text/x-wiki
== '''Masked packages in Portage - Gentoo Linux''' ==
=== Masked packages ===
There are several reasons for the Gentoo developers to place a mask on a package.
<br />
For instance:
* A package may not be entirely tested on your arch.
* It may not be stable on your arch.
* It might be buggy together with other packages on your system.
If you want to override the masking of the package, you just have to add a line to a specific file.
There are two levels of masked packages.
* Packages masked with a certain keyword
* and/or hard masked packages
For a regular x86-system, the keyword would be x86. To unmask all packages with a certain keyword edit {{Filename|/etc/make.conf}}. The example will unmask all masked x86 packages.
{{Box file|/etc/make.conf|
<nowiki>ACCEPT_KEYWORDS="~x86"</nowiki>
}}
The easiest way to unmask a specific package, is to add a line using a method like this:
{{Box code||
(1) echo "app-admin/sudo" >> /etc/portage/package.keywords
(2) echo "app-admin/sudo" >> /etc/portage/package.unmask
}}
Only use the second method if the package is hard-masked.
You can use specific operands, to control certain versions of a package to be masked/unmasked:
*= - Use this when specifying a specific package to unmask, like x11-terms/rxvt/rxvt-2.7.10-r2
{{Box file|/etc/package.unmask|
# Unmask only rxvt-2.7.10-r2 but not older or newer versions
<nowiki>=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
# Unmask rxvt-2.7.10-r2 and any newer versions
<nowiki>>=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
# Unmask up to rxvt-2.7.10-r2 but not any newer versions
<nowiki><=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
}}
=== Masking a package ===
If you have a package that is unstable on your system you can mask that package by adding it to {{Filename|/etc/portage/package.mask}}
The work on this article will continue.
/Chris
[[Category:Gentoo]]
27b6b245a1c49a25df2cb222d01cb28502ea040d
2093
2092
2006-11-11T20:12:04Z
EXt
1
wikitext
text/x-wiki
== '''Masked packages in Portage - Gentoo Linux''' ==
=== Masked packages ===
There are several reasons for the Gentoo developers to place a mask on a package.
<br />
For instance:
* A package may not be entirely tested on your arch.
* It may not be stable on your arch.
* It might be buggy together with other packages on your system.
If you want to override the masking of the package, you just have to add a line to a specific file.
There are two levels of masked packages.
* Packages masked with a certain keyword
* and/or hard masked packages
For a regular x86-system, the keyword would be x86. To unmask all packages with a certain keyword edit {{Filename|/etc/make.conf}}. The example will unmask all masked x86 packages.
{{Box file|/etc/make.conf|
<nowiki>ACCEPT_KEYWORDS="~x86"</nowiki>
}}
The easiest way to unmask a specific package, is to add a line using a method like this:
{{Box code||
(1) echo "app-admin/sudo" >> /etc/portage/package.keywords
(2) echo "app-admin/sudo" >> /etc/portage/package.unmask
}}
Only use the second method if the package is hard-masked.
You can use specific operands, to control certain versions of a package to be masked/unmasked:
*= - Use this when specifying a specific package to unmask, like x11-terms/rxvt/rxvt-2.7.10-r2
{{Box file|/etc/package.unmask|
# Unmask only rxvt-2.7.10-r2 but not older or newer versions
<nowiki>=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
# Unmask rxvt-2.7.10-r2 and any newer versions
<nowiki>>=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
# Unmask up to rxvt-2.7.10-r2 but not any newer versions
<nowiki><=x11-terms/rxvt/rxvt-2.7.10-r2</nowiki>
}}
=== Masking a package ===
If you have a package that is unstable on your system you can mask that package by adding it to {{Filename|/etc/portage/package.mask}}
The work on this article will continue.
/Chris
ad1c6d4512d8860b16f7486c43b4db1aa91bbb1b
2092
2088
2006-11-09T23:17:00Z
Chris
7
/* '''Masked packages in Portage - Gentoo Linux''' */
wikitext
text/x-wiki
== '''Masked packages in Portage - Gentoo Linux''' ==
'''''Masked packages'''''
There are several reasons for the Gentoo devs to place a mask on a package.
<br />
For instance:
*A package may not be entirely tested on your arch.
*It may not be stable on your arch.
*It might be buggy together with other packages on your system.
If you want to override the masking of the package, you just have to add a line to a specific file.
There are two levels of masked packages.
*Packages masked with a certain keyword
*and/or hard masked packages
For my type of system, a regular x86-system, the keyword would be ~x86.
The easiest way to unmask a package, is to add a line using a method like this:
<code>
(1)echo "app-admin/sudo" >> /etc/portage/package.keywords
(2)echo "app-admin/sudo" >> /etc/portage/package.unmask
</code>
Only use the second method if the package is hard-masked.
You can use specific operands, to control certain versions of a package to be masked/unmasked:
*= - Use this when specifying a specific package to unmask, like x11-terms/rxvt/rxvt-2.7.10-r2
The work on this article will continue.
/Chris
d6b9571649501fe9610cc96443681eb06f3fecfd
2088
2086
2006-11-09T15:13:40Z
Chris
7
/* '''Masked packages in Portage - Gentoo Linux''' */
wikitext
text/x-wiki
== '''Masked packages in Portage - Gentoo Linux''' ==
'''''Masked packages'''''
There are several reasons for the Gentoo devs to place a mask on a package.
<br />
For instance:
*A package may not be entirely tested on your arch.
*It may not be stable on your arch.
*It might be buggy together with other packages on your system.
If you want to override the masking of the package, you just have to add a line to a specific file.
There are two levels of masked packages.
*Keyword
*Hard masking
For my type of system, a regular x86-system, the keyword would be ~x86.
The easiest way to unmask a package, is to add a line using a method like this:
<code>
(1)echo "app-admin/sudo" >> /etc/portage/package.keywords
(2)echo "app-admin/sudo" >> /etc/portage/package.unmask
</code>
Only use the second method if the package is hard-masked.
You can use specific operands, to control certain versions of a package to be masked/unmasked:
*= - Use this when specifying a specific package to unmask, like x11-terms/rxvt/rxvt-2.7.10-r2
The work on this article will continue.
/Chris
c9be3e2022ea727b80fdc635bb71f360b57345bd
2086
2085
2006-11-09T15:08:26Z
Chris
7
/* '''Masked packages in Portage, Gentoo Linux''' */
wikitext
text/x-wiki
== '''Masked packages in Portage - Gentoo Linux''' ==
'''''Masked packages'''''
There are several reasons for the Gentoo devs to place a mask on a package.[[Image:http://www.gentoo.org/images/glogo-small.png]]
<br />
For instance:
*A package may not be entirely tested on your arch.
*It may not be stable on your arch.
*It might be buggy together with other packages on your system.
If you want to override the masking of the package, you just have to add a line to a specific file.
There are two levels of masked packages.
*Keyword
*Hard masking
For my type of system, a regular x86-system, the keyword would be ~x86.
The easiest way to unmask a package, is to add a line using a method like this:
<code>
(1)echo "app-admin/sudo" >> /etc/portage/package.keywords
(2)echo "app-admin/sudo" >> /etc/portage/package.unmask
</code>
Only use the second method if the package is hard-masked.
You can use specific operands, to control certain versions of a package to be masked/unmasked:
*= - Use this when specifying a specific package to unmask, like x11-terms/rxvt/rxvt-2.7.10-r2
*<= - Use this when you want to unmask
The work on this article will continue.
/Chris
3da018d9777252bcfcbcb6464391390cbe98ce75
2085
2084
2006-11-09T12:08:42Z
Chris
7
/* '''Here I will explain masked pakcages of different degrees in portage, the package-system of Gentoo Linux.''' */
wikitext
text/x-wiki
== '''Masked packages in Portage, Gentoo Linux''' ==
''Masked packages''
There are several reasons for the Gentoo devs to place a mask on certain packages.
For instance:
A package may not be entirely tested on your arch,
It may not be stable on your arch,
It may be buggy together with other packages on your system.
The work on this article will continue.
/Chris
16a6af1bf139325345d4e396605aed5bf2573f69
2084
2006-11-09T12:08:04Z
Chris
7
wikitext
text/x-wiki
== '''Here I will explain masked pakcages of different degrees in portage, the package-system of Gentoo Linux.''' ==
''Masked packages''
There are several reasons for the Gentoo devs to place a mask on certain packages.
For instance:
A package may not be entirely tested on your arch,
It may not be stable on your arch,
It may be buggy together with other packages on your system.
The work on this article will continue.
/Chris
01243d355125be54bce5ad1164d95a2076012900
Git/Fix public rebase
0
1608
2698
2697
2012-05-04T11:51:53Z
EXt
1
swap C1 and C2 as new C1 was made before C2.
wikitext
text/x-wiki
After accidentally rebasing a commit that had been pushed to a public repository a merge is required. This makes the history look nasty (same commit message repeated twice and a merge with no diff.)
=== Initial state ===
* 9570459 (origin/branch, branch) Merge branch 'branch' of ... into branch
|\
| * e98531c C1
* | 16d3ba1 C2
* | af9ee86 B
|/
* 1538c65 A
Where C1 and C2 is identical. Merge contains no chages.
=== Local ===
% git reset --hard 16d3ba1
HEAD is now at 16d3ba1 C2
This moves local HEAD to the rebased commit.
* 9570459 (origin/branch) Merge branch 'branch' of ... into branch
|\
| * e53d2fc C1
* | 16d3ba1 (HEAD, branch) C2
* | af9ee86 B
|/
* 1538c65 A
However remote is still "wrong" and you cannot push:
% git push origin branch
To ...
! [rejected] branch -> branch (non-fast-forward)
error: failed to push some refs to '...'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
If you pull HEAD whould be fast-forwared back to <tt>9570459</tt>.
=== Remote ===
Adding the <tt>--force</tt> flag when pushing allows you push:
% git push origin branch --force
Total 0 (delta 0), reused 0 (delta 0)
To ...
+ 9570459...16d3ba1 branch -> branch (forced update)
But use with caution! While <tt>e53d2fc</tt> (C1) and <tt>9570459</tt> (merge) is not 100% lost nothing will refer to them anymore (thus won't show up anywhere).
* 16d3ba1 (HEAD, origin/branch, branch) C2
* a5a9739 B
* 1538c65 A
[[Category:Git]]
7f35a22444a915097cc81d50e11cbfcd450f9546
2697
2696
2012-05-04T11:50:04Z
EXt
1
manually fixing graph so the unrelated branch isn't shown
wikitext
text/x-wiki
After accidentally rebasing a commit that had been pushed to a public repository a merge is required. This makes the history look nasty (same commit message repeated twice and a merge with no diff.)
=== Initial state ===
* 9570459 (origin/branch, branch) Merge branch 'branch' of ... into branch
|\
| * e98531c C2
* | 16d3ba1 C1
* | af9ee86 B
|/
* 1538c65 A
Where C1 and C2 is identical. Merge contains no chages.
=== Local ===
% git reset --hard 16d3ba1
HEAD is now at 16d3ba1 C1
This moves local HEAD to the rebased commit.
* 9570459 (origin/branch) Merge branch 'branch' of ... into branch
|\
| * e53d2fc C2
* | 16d3ba1 (HEAD, branch) C1
* | af9ee86 B
|/
* 1538c65 A
However remote is still "wrong" and you cannot push:
% git push origin branch
To ...
! [rejected] branch -> branch (non-fast-forward)
error: failed to push some refs to '...'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
If you pull HEAD whould be fast-forwared back to <tt>9570459</tt>.
=== Remote ===
Adding the <tt>--force</tt> flag when pushing allows you push:
% git push origin branch --force
Total 0 (delta 0), reused 0 (delta 0)
To ...
+ 9570459...16d3ba1 branch -> branch (forced update)
But use with caution! While <tt>e53d2fc</tt> (C2) and <tt>9570459</tt> (merge) is not 100% lost nothing will refer to them anymore (thus won't show up anywhere).
* 16d3ba1 (HEAD, origin/branch, branch) C1
* a5a9739 B
* 1538c65 A
[[Category:Git]]
d6e0f7ded61aa33aeb863dd64d7b0d1abe1d49fe
2696
2695
2012-05-04T11:44:40Z
EXt
1
wikitext
text/x-wiki
After accidentally rebasing a commit that had been pushed to a public repository a merge is required. This makes the history look nasty (same commit message repeated twice and a merge with no diff.)
=== Initial state ===
| * 9570459 (origin/branch, branch) Merge branch 'branch' of ... into branch
| |\
| | * e98531c C2
| * | 16d3ba1 C1
|/ /
* | af9ee86 B
|/
* 1538c65 A
Where C1 and C2 is identical. Merge contains no chages.
=== Local ===
% git reset --hard 16d3ba1
HEAD is now at 16d3ba1 C1
This moves local HEAD to the rebased commit.
| * 9570459 (origin/branch) Merge branch 'branch' of ... into branch
| |\
| | * e53d2fc C2
| * | 16d3ba1 (HEAD, branch) C1
|/ /
* | af9ee86 B
|/
* 1538c65 A
However remote is still "wrong" and you cannot push:
% git push origin branch
To ...
! [rejected] branch -> branch (non-fast-forward)
error: failed to push some refs to '...'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
If you pull HEAD whould be fast-forwared back to <tt>9570459</tt>.
=== Remote ===
Adding the <tt>--force</tt> flag when pushing allows you push:
% git push origin branch --force
Total 0 (delta 0), reused 0 (delta 0)
To ...
+ 9570459...16d3ba1 branch -> branch (forced update)
But use with caution! While <tt>e53d2fc</tt> (C2) and <tt>9570459</tt> (merge) is not 100% lost nothing will refer to them anymore (thus won't show up anywhere).
| * 16d3ba1 (HEAD, origin/branch, branch) C1
| * a5a9739 B
|/
* 1538c65 A
[[Category:Git]]
d37e77227ec68c81b1606a75abbf0106797eb4bd
2695
2012-05-04T11:44:09Z
EXt
1
Created page with "After accidentally rebasing a commit that had been pushed to a public repository a merge is required. This makes the history look nasty (same commit message repeated twice and..."
wikitext
text/x-wiki
After accidentally rebasing a commit that had been pushed to a public repository a merge is required. This makes the history look nasty (same commit message repeated twice and a merge with no diff.)
=== Initial state ===
| * 9570459 (origin/branch, branch) Merge branch 'branch' of ... into branch
| |\
| | * e98531c C2
| * | 16d3ba1 C1
|/ /
* | af9ee86 B
|/
* 1538c65 A
Where C1 and C2 is identical. Merge contains no chages.
=== Local ===
% git reset --hard 16d3ba1
HEAD is now at 16d3ba1 C1
This moves local HEAD to the rebased commit.
| * 9570459 (origin/branch) Merge branch 'branch' of ... into branch
| |\
| | * e53d2fc C2
| * | 16d3ba1 (HEAD, branch) C1
|/ /
* | af9ee86 B
|/
* 1538c65 A
However remote is still "wrong" and you cannot push:
% git push origin branch
To ...
! [rejected] branch -> branch (non-fast-forward)
error: failed to push some refs to '...'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
If you pull HEAD whould be fast-forwared back to <tt>9570459</tt>.
=== Remote ===
Adding the <tt>--force</tt> flag when pushing allows you push:
% git push origin branch --force
Total 0 (delta 0), reused 0 (delta 0)
To ...
+ 9570459...16d3ba1 branch -> branch (forced update)
But use with caution! While <tt>e53d2fc</tt> (C2) and <tt>9570459</tt> (merge) is not 100% lost nothing will refer to them anymore (thus won't show up anywhere).
| * 16d3ba1 (HEAD, origin/branch, branch) C1
| * a5a9739 B
|/
* 1538c65 A
87d452d681a5332213e8a1a207831e5d5dd20e94
Git/Push all branches
0
1831
3036
2015-08-04T12:10:02Z
EXt
1
Created page with "== Push all local branches == <syntaxhighlight lang="bash">git push --all REMOTE</syntaxhighlight> == Push all branches from one remote to another == <syntaxhighlight lang=..."
wikitext
text/x-wiki
== Push all local branches ==
<syntaxhighlight lang="bash">git push --all REMOTE</syntaxhighlight>
== Push all branches from one remote to another ==
<syntaxhighlight lang="bash">
src=origin dst=mirror; git push ${dst} $(for branch in $(git branch --list --remote "${src}/*" | grep -v --regexp='->'); do echo "${branch}:refs/heads/${branch//${src}\/}"; done)
</syntaxhighlight>
It works by listing all branchs from a given remote using <code>git branch --list --remote</code> and outputs it as <code>SRC/BRANCH:refs/heads/BRANCH</code> (<tt>refs/heads/</tt> is needed because the branch isn't local). The rest if just a regular <code>git push</code>.
[[Category:Git]]
850b589de7124b47be7e5bf7c352ef487d2f2b11
Git/Remove branch in public repository
0
1609
2699
2012-05-04T11:59:28Z
EXt
1
Created page with " % git push REMOTE :BRANCH It means push nothing to BRANCH at REMOTE, effectively removing it. [[Category: git]]"
wikitext
text/x-wiki
% git push REMOTE :BRANCH
It means push nothing to BRANCH at REMOTE, effectively removing it.
[[Category: git]]
8c514bf450fb3ee548594312b875a303e78bdaf0
Git hooks/Export on push
0
1591
2669
2668
2012-02-28T13:15:55Z
EXt
1
wikitext
text/x-wiki
<codebox filename="post-update" lang="bash">
#!/bin/sh
# update
GIT_WORK_TREE=/path/to/repo git checkout -f
# update http access
git update-server-info
</codebox>
[[Category:Git]]
a1cc363ba2e152ca90f6cd1d16c7bdfb4b8e5675
2668
2012-02-28T13:15:42Z
EXt
1
Created page with "<codebox filename="post-update" lang="bash"> #!/bin/sh # update GIT_WORK_TREE=/path/to/repo git checkout -f # update http access git update-server-info </codebox>"
wikitext
text/x-wiki
<codebox filename="post-update" lang="bash">
#!/bin/sh
# update
GIT_WORK_TREE=/path/to/repo git checkout -f
# update http access
git update-server-info
</codebox>
bf4566a25964f69bb627fcfc131b9754e7dffb8a
Grub: Restore GRUB
0
1578
2617
2012-01-27T12:56:14Z
EXt
1
moved [[Grub: Restore GRUB]] to [[GRUB: Restore GRUB]]: derp
wikitext
text/x-wiki
#REDIRECT [[GRUB: Restore GRUB]]
2bbd3e4276ee90476e1d626d1bd1c506e2d4dc3a
HOWTO Restore GRUB after Windows XP installation-cd
0
1576
2613
2012-01-27T12:53:51Z
EXt
1
moved [[HOWTO Restore GRUB after Windows XP installation-cd]] to [[Grub: Restore GRUB]]: Consistent naming
wikitext
text/x-wiki
#REDIRECT [[Grub: Restore GRUB]]
23b63bb99e7a8030657e64a98176ec4623329bbd
Huvudsida
0
1375
1896
2006-05-08T09:05:17Z
EXt
1
[[Huvudsida]] moved to [[Main Page]]: Changed language
wikitext
text/x-wiki
#REDIRECT [[Main Page]]
c222ad63e9e6a1e286ff83e0861447ce17bf759f
Java/What I hate about Java
0
1498
2413
2401
2010-12-10T12:40:23Z
EXt
1
wikitext
text/x-wiki
* Not possible to use enum in switch-cases. [http://stackoverflow.com/questions/2663980/why-do-i-get-an-enum-constant-reference-cannot-be-qualified-in-a-case-label]
* No default parameter values. Yes, I see why; and I know more than a few workarounds; it is still annoying.
* "inner classes cannot have static declarations"
851ed3f697b8e4e9adbc8b2f07d1ab3f3ee6e356
2401
2400
2010-08-03T14:16:31Z
EXt
1
wikitext
text/x-wiki
* Not possible to use enum in switch-cases. [http://stackoverflow.com/questions/2663980/why-do-i-get-an-enum-constant-reference-cannot-be-qualified-in-a-case-label]
* No default parameter values. Yes, I see why; and I know more than a few workarounds; it is still annoying.
d2d82a2d149cf88f398400cf332a601a6031c78d
2400
2010-08-03T14:10:34Z
EXt
1
enum+switch
wikitext
text/x-wiki
* Not possible to use enum in switch-cases. [http://stackoverflow.com/questions/2663980/why-do-i-get-an-enum-constant-reference-cannot-be-qualified-in-a-case-label]
ecc0ba3b6a2095d79dfa083dbf648667007ea203
Keybindings
0
1435
2456
2156
2010-12-27T12:01:40Z
EXt
1
proper codebox
wikitext
text/x-wiki
A simple way to handle keybindings for games is what I call ''actionmap''. An actionmap is a one-way mapping between a key and an action. Actionmaps allows easy configurable keybindings, changable during runtime. It is also worth reading the article about [[Reading keycodes instead of ASCII|keycodes versus ascii]]. Similar techniques is used by many game engines.
== Actions ==
An action is something that should happen, moving forward for instance. Actions may be defined by a simple enum, as in listing 1. Another way might be to use strings as we could easily invent new actions from the game logic. Performance should not be a great deal since actions isn't checked that often, not even when smashing the keys. Actually, the way you represent an action doesn't matter at all.
<codebox title="Listing 1">
enum Action {
NO_ACTION,
MOVE_FORWARD,
MOVE_BACKWARD,
STRAFE_LEFT,
STRAFE_RIGHT,
PRIMARY_FIRE,
SECONDARY_FIRE,
ACTION_MAX
};
</codebox>
== The Actionmap ==
A very simple actionmap would be a c-style array where each possible key represents an action. If the key should not represent an actual action it defaults to NO_ACTION. When a key is pressed you simply use the key as the index in the array to get the related action. This is not always the best solution but it works in quite well most of the time. A better way is to implement it using an stl::map. Thus we won't have to store actions for all possible keys. But how about mouse input? I've have been very successful just offsetting the mouse button by the last key. So the first mousebutton would equal KEY_MAX + 0 and the second KEY_MAX + 1 etc.
<codebox title="Simple actionmap">
// Simple actionmap where each possible key represents an action (default: NO_ACTION).
Action actionmap[KEY_MAX];
// Reset all actions to NO_ACTION
for ( int i = 0; i < KEY_MAX; i++ ){
actionmap[i] = NO_ACTION;
}
// Setup some keybindings
actionmap[KEY_W] = MOVE_FORWARD;
actionmap[KEY_S] = MOVE_BACKWARD;
actionmap[KEY_A] = STRAFE_LEFT;
actionmap[KEY_D] = STRAFE_RIGHT;
</codebox>
== Sample implementation ==
I've written a [http://svn.sidvind.com/viewvc/code/trunk/Experiments/keybindings sample implementation] demonstrating the technique described above. The sample is released under GNU Lesser General Public. Feel free to use in your applications.
ee514689d5d6e17e7a65cbe36e09168fcdda905f
2156
2155
2007-12-11T19:51:48Z
EXt
1
Link to sample implementation
wikitext
text/x-wiki
A simple way to handle keybindings for games is what I call ''actionmap''. An actionmap is a one-way mapping between a key and an action. Actionmaps allows easy configurable keybindings, changable during runtime. It is also worth reading the article about [[Reading keycodes instead of ASCII|keycodes versus ascii]]. Similar techniques is used by many game engines.
== Actions ==
An action is something that should happen, moving forward for instance. Actions may be defined by a simple enum, as in listing 1. Another way might be to use strings as we could easily invent new actions from the game logic. Performance should not be a great deal since actions isn't checked that often, not even when smashing the keys. Actually, the way you represent an action doesn't matter at all.
{{Box code|Listing 1|
<code><cpp/>
enum Action {
NO_ACTION,
MOVE_FORWARD,
MOVE_BACKWARD,
STRAFE_LEFT,
STRAFE_RIGHT,
PRIMARY_FIRE,
SECONDARY_FIRE,
ACTION_MAX
};
</code>
}}
== The Actionmap ==
A very simple actionmap would be a c-style array where each possible key represents an action. If the key should not represent an actual action it defaults to NO_ACTION. When a key is pressed you simply use the key as the index in the array to get the related action. This is not always the best solution but it works in quite well most of the time. A better way is to implement it using an stl::map. Thus we won't have to store actions for all possible keys. But how about mouse input? I've have been very successful just offsetting the mouse button by the last key. So the first mousebutton would equal KEY_MAX + 0 and the second KEY_MAX + 1 etc.
{{Box code|Simple actionmap|
<code><cpp/>
// Simple actionmap where each possible key represents an action (default: NO_ACTION).
Action actionmap[KEY_MAX];
// Reset all actions to NO_ACTION
for ( int i = 0; i < KEY_MAX; i++ ){
actionmap[i] = NO_ACTION;
}
// Setup some keybindings
actionmap[KEY_W] = MOVE_FORWARD;
actionmap[KEY_S] = MOVE_BACKWARD;
actionmap[KEY_A] = STRAFE_LEFT;
actionmap[KEY_D] = STRAFE_RIGHT;
</code>
}}
== Sample implementation ==
I've written a [http://svn.sidvind.com/viewvc/code/trunk/Experiments/keybindings sample implementation] demonstrating the technique described above. The sample is released under GNU Lesser General Public. Feel free to use in your applications.
612dc635c9f4a9b781639cc482493d55e827df70
2155
2154
2007-12-11T18:08:18Z
EXt
1
Added more text
wikitext
text/x-wiki
A simple way to handle keybindings for games is what I call ''actionmap''. An actionmap is a one-way mapping between a key and an action. Actionmaps allows easy configurable keybindings, changable during runtime. It is also worth reading the article about [[Reading keycodes instead of ASCII|keycodes versus ascii]]. Similar techniques is used by many game engines.
== Actions ==
An action is something that should happen, moving forward for instance. Actions may be defined by a simple enum, as in listing 1. Another way might be to use strings as we could easily invent new actions from the game logic. Performance should not be a great deal since actions isn't checked that often, not even when smashing the keys. Actually, the way you represent an action doesn't matter at all.
{{Box code|Listing 1|
<code><cpp/>
enum Action {
NO_ACTION,
MOVE_FORWARD,
MOVE_BACKWARD,
STRAFE_LEFT,
STRAFE_RIGHT,
PRIMARY_FIRE,
SECONDARY_FIRE,
ACTION_MAX
};
</code>
}}
== The Actionmap ==
A very simple actionmap would be a c-style array where each possible key represents an action. If the key should not represent an actual action it defaults to NO_ACTION. When a key is pressed you simply use the key as the index in the array to get the related action. This is not always the best solution but it works in quite well most of the time. A better way is to implement it using an stl::map. Thus we won't have to store actions for all possible keys. But how about mouse input? I've have been very successful just offsetting the mouse button by the last key. So the first mousebutton would equal KEY_MAX + 0 and the second KEY_MAX + 1 etc.
{{Box code|Simple actionmap|
<code><cpp/>
// Simple actionmap where each possible key represents an action (default: NO_ACTION).
Action actionmap[KEY_MAX];
// Reset all actions to NO_ACTION
for ( int i = 0; i < KEY_MAX; i++ ){
actionmap[i] = NO_ACTION;
}
// Setup some keybindings
actionmap[KEY_W] = MOVE_FORWARD;
actionmap[KEY_S] = MOVE_BACKWARD;
actionmap[KEY_A] = STRAFE_LEFT;
actionmap[KEY_D] = STRAFE_RIGHT;
</code>
}}
2d974be27ee0cd30be784ae9c41c48dc4686dbef
2154
2007-12-11T18:01:05Z
EXt
1
Keybindings article
wikitext
text/x-wiki
A simple way to handle keybindings for games is what I call ''actionmap''. An actionmap is a one-way mapping between a key and an action. Actionmaps allows easy configurable keybindings, changable during runtime.
== Actions ==
An action is something that should happen, moving forward for instance. Actions may be defined by a simple enum, as in listing 1.
{{Box code|Listing 1|
<code><cpp/>
enum Action {
NO_ACTION,
MOVE_FORWARD,
MOVE_BACKWARD,
STRAFE_LEFT,
STRAFE_RIGHT,
PRIMARY_FIRE,
SECONDARY_FIRE,
ACTION_MAX
};
</code>
}}
== The Actionmap ==
A very simple actionmap would be a c-style array where each possible key represents an action. If the key should not represent an actual action it defaults to NO_ACTION. When a key is pressed you simply use the key as the index in the array to get the related action. This is not always the best solution but it works in quite well most of the time. A better way is to implement it using an stl::map. Thus we won't have to store actions for all possible keys. But how about mouse input? I've have been very successful just offsetting the mouse button by the last key. So the first mousebutton would equal KEY_MAX + 0 and the second KEY_MAX + 1 etc.
{{Box code|Simple actionmap|
<code><cpp/>
// Simple actionmap where each possible key represents an action (default: NO_ACTION).
Action actionmap[KEY_MAX];
// Reset all actions to NO_ACTION
for ( int i = 0; i < KEY_MAX; i++ ){
actionmap[i] = NO_ACTION;
}
// Setup some keybindings
actionmap[KEY_W] = MOVE_FORWARD;
actionmap[KEY_S] = MOVE_BACKWARD;
actionmap[KEY_A] = STRAFE_LEFT;
actionmap[KEY_D] = STRAFE_RIGHT;
</code>
}}
1da68ee4be3b59a5d5627592e4634d5b5d278867
Library list
0
1436
2224
2170
2008-05-31T21:47:31Z
EXt
1
wikitext
text/x-wiki
== Texture libraries ==
{| cellspacing="0"
!style="width:150px;"| Library
!style="width:100px; background: #ddf;"| Licence
!style="width:150px;"| Platform
!style="background: #ddf;"| Read
! Write
|- style="background: #ddd;"
| [http://www.lonesock.net/soil.html SOIL]
|style="background: #ccf;"| PD
|| Win32, *nix, Mac OSX
|style="background: #ccf;"| BMP, PNG, JPG, TGA, DDS, HDR | BMP, TGA, DDS
|| TGA, BMP, DDS
|-
| [http://freeimage.sourceforge.net/ FreeImage]
|style="background: #ddf;"| FreeImage, GPL
|| Win32, *nix, Mac OSX
|style="background: #ddf;"| BMP, Dr. Halo, DDS, EXR, Raw Fax G3, GIF, HDR, ICO, IFF, JBIG, JNG, JPEG/JIF, JPEG-2000, KOALA, Kodak PhotoCD, MNG, PCX, PBM, PGM, PNG, PPM, Photoshop, Sun RAS, SGI, TARGA, TIFF, WBMP, XBM, XPM
|| BMP, EXR, GIF, HDR, ICO, JBIG, JPEG/JIF, JPEG-2000, PBM, PGM, PNG, PPM, TARGA, TIFF, WBMP, XPM
|- style="background: #ddd;"
|| [http://openil.sourceforge.net/ DevIL]
|style="background: #ccf;"| LGPL
|| Win32, *nix, Mac OSX
|style="background: #ccf;"| BMP, CUT, DCX, DDS, ICO, GIF, JPG, LBM, LIF, MDL, PCD, PCX, PIC, PNG, PNM, PSD, PSP, RAW, SGI, TGA, TIF, WAL, ACT, PAL, HDR, Doom Graphics
|| BMP, DDS, JPG, PCX, PNG, PNM, RAW, SGI, TGA, TIF, PAL, HDR
|-
| [http://corona.sourceforge.net/ corona]
|style="background: #ddf;"| zlib
|| Win32, *nix, Mac OSX, IRIX
|style="background: #ddf;"| PNG, JPEG, PCX, BMP, TGA, GIF
|| PNG, TGA
|}
== Math libraries ==
{| cellspacing="0"
!style="width:150px;"| Library
!style="width:100px; background: #ddf;"| Licence
!style="width:150px;"| Platform
!style="background: #ddf;"| Features
|- style="background: #ddd;"
| [http://cmldev.net/ CML]
|style="background: #ccf;"| Boost
|| Win32, *nix, Mac OSX
|style="background: #ccf;"| Vector, matrix, quaternion, frustum, projection, highly configurable.
|}
d356211b3f5c06d0ac21c1860ed95d9e0df129b4
2170
2169
2008-01-16T22:08:23Z
EXt
1
wikitext
text/x-wiki
== Texture libraries ==
{| cellspacing="0"
!style="width:150px;"| Library
!style="width:100px; background: #ddf;"| Licence
!style="width:150px;"| Platform
!style="background: #ddf;"| Read
! Write
|- style="background: #ddd;"
| [http://www.lonesock.net/soil.html SOIL]
|style="background: #ccf;"| PD
|| Win32, *nix, Mac OSX
|style="background: #ccf;"| BMP, PNG, JPG, TGA, DDS, HDR | BMP, TGA, DDS
|| TGA, BMP, DDS
|-
| [http://freeimage.sourceforge.net/ FreeImage]
|style="background: #ddf;"| FreeImage, GPL
|| Win32, *nix, Mac OSX
|style="background: #ddf;"| BMP, Dr. Halo, DDS, EXR, Raw Fax G3, GIF, HDR, ICO, IFF, JBIG, JNG, JPEG/JIF, JPEG-2000, KOALA, Kodak PhotoCD, MNG, PCX, PBM, PGM, PNG, PPM, Photoshop, Sun RAS, SGI, TARGA, TIFF, WBMP, XBM, XPM
|| BMP, EXR, GIF, HDR, ICO, JBIG, JPEG/JIF, JPEG-2000, PBM, PGM, PNG, PPM, TARGA, TIFF, WBMP, XPM
|- style="background: #ddd;"
|| [http://openil.sourceforge.net/ DevIL]
|style="background: #ccf;"| LGPL
|| Win32, *nix, Mac OSX
|style="background: #ccf;"| BMP, CUT, DCX, DDS, ICO, GIF, JPG, LBM, LIF, MDL, PCD, PCX, PIC, PNG, PNM, PSD, PSP, RAW, SGI, TGA, TIF, WAL, ACT, PAL, HDR, Doom Graphics
|| BMP, DDS, JPG, PCX, PNG, PNM, RAW, SGI, TGA, TIF, PAL, HDR
|-
| [http://corona.sourceforge.net/ corona]
|style="background: #ddf;"| zlib
|| Win32, *nix, Mac OSX, IRIX
|style="background: #ddf;"| PNG, JPEG, PCX, BMP, TGA, GIF
|| PNG, TGA
|}
be9cd9a4b0a3c585d7a9aed3df3c5d35396d8cde
2169
2008-01-16T21:56:58Z
EXt
1
New page: == Texture libraries == {| cellspacing="0" !style="width:150px;"| Library !style="width:100px;"| Licence !style="width:150px;"| Platform ! Read ! Write |- | [http://www.lonesock.net/so...
wikitext
text/x-wiki
== Texture libraries ==
{| cellspacing="0"
!style="width:150px;"| Library
!style="width:100px;"| Licence
!style="width:150px;"| Platform
! Read
! Write
|-
| [http://www.lonesock.net/soil.html SOIL] || PD || Win32, *nix, Mac OSX || BMP, PNG, JPG, TGA, DDS, HDR | BMP, TGA, DDS
|- style="background: #ddd;"
| [http://freeimage.sourceforge.net/ FreeImage] || FreeImage, GPL || Win32, *nix, Mac OSX || BMP, Dr. Halo, DDS, EXR, Raw Fax G3, GIF, HDR, ICO, IFF, JBIG, JNG, JPEG/JIF, JPEG-2000, KOALA, Kodak PhotoCD, MNG, PCX, PBM, PGM, PNG, PPM, Photoshop, Sun RAS, SGI, TARGA, TIFF, WBMP, XBM, XPM || BMP, EXR, GIF, HDR, ICO, JBIG, JPEG/JIF, JPEG-2000, PBM, PGM, PNG, PPM, TARGA, TIFF, WBMP, XPM
|-
| [http://openil.sourceforge.net/ DevIL] || LGPL ||
|- style="background: #ddd;"
| [http://corona.sourceforge.net/ corona] || zlib ||
|}
8bd8a9e66aadcc4b6d9df946f6d512026a2a2be1
Libtool gdb
0
1570
2640
2636
2012-01-27T13:17:28Z
EXt
1
wikitext
text/x-wiki
When using libtool you cannot directly execute gdb or other tools as the executable is hidden until installed, instead you are presented with:
# gdb ./executable
"/path/to/executable": not in executable format: File format not recognized
Libtool uses a small wrapper shellscript to setup <tt>LD_LIBRARY_PATH</tt> for you so you don't have to do it manually or worse run against the wrong version of the library (e.g. system version). The real executable is usually located in {{Filename|.libs/executable}}. However using <tt>gdb .libs/executable</tt> is not recommended. Instead ask libtool to execute the application for you:
libtool --mode=execute gdb ./executable
libtool --mode=execute valgrind ./executable
libtool --mode=execute whatever ./executable
[[Category:linux-dev]]
6e92e3027ecfa879c911a3f8d53e37f2baa7079c
2636
2587
2012-01-27T13:07:11Z
EXt
1
wikitext
text/x-wiki
libtool --mode=execute gdb PROGNAME
[[Category:linux-dev]]
2ad12683da56d8740d4e06a8d6e616d24ab29568
2587
2012-01-12T16:41:31Z
EXt
1
Created page with " libtool --mode=execute gdb PROGNAME"
wikitext
text/x-wiki
libtool --mode=execute gdb PROGNAME
88c31a4324da4b83b07b1ee1263c97f15c89ad9f
Linking/Deferred linking for binary packages
0
1500
2637
2598
2012-01-27T13:07:27Z
EXt
1
wikitext
text/x-wiki
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
This helps with two problems:
# Library versions, if a library has changed its version number but the change is ABI compatible with libfoo.so a simple rebuild of app will resolve this (just as rebuilding source-based packages)
# Library path issues, some distributions place libraries in non-standard locations and maybe a dependency is installed by the user in their home-directory. This can also be fixed using symlinks or by fiddling with LD_LIBRARY_PATH but deferred linking is better in long term.
<codebox filename="app.c">
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</codebox>
<codebox filename="foo.h">
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</codebox>
<codebox filename="foo.c">
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
return 0;
}
</codebox>
<codebox filename="Makefile" lang="bash">
all: app
libfoo.so: CFLAGS+=-fPIC
libfoo.so: foo.o
$(CC) -shared $(LDFLAGS) foo.o -o libfoo.so
app: app.o libfoo.so
$(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app
%.o : %.c
$(CC) -Wall $(CFLAGS) -c $< -o $@
clean:
rm -rf *.so *.o app
</codebox>
[[Category:Linux]]
[[Category:Programming]]
[[Category:linux-dev]]
23990acf4bdbf82ed1dcddbf1360af59b6ebe9b0
2598
2597
2012-01-27T12:44:10Z
EXt
1
wikitext
text/x-wiki
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
This helps with two problems:
# Library versions, if a library has changed its version number but the change is ABI compatible with libfoo.so a simple rebuild of app will resolve this (just as rebuilding source-based packages)
# Library path issues, some distributions place libraries in non-standard locations and maybe a dependency is installed by the user in their home-directory. This can also be fixed using symlinks or by fiddling with LD_LIBRARY_PATH but deferred linking is better in long term.
<codebox filename="app.c">
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</codebox>
<codebox filename="foo.h">
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</codebox>
<codebox filename="foo.c">
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
return 0;
}
</codebox>
<codebox filename="Makefile" lang="bash">
all: app
libfoo.so: CFLAGS+=-fPIC
libfoo.so: foo.o
$(CC) -shared $(LDFLAGS) foo.o -o libfoo.so
app: app.o libfoo.so
$(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app
%.o : %.c
$(CC) -Wall $(CFLAGS) -c $< -o $@
clean:
rm -rf *.so *.o app
</codebox>
[[Category:Linux]]
[[Category:Programming]]
f0dfc991377d0a7b9d14a91a7034dc61b7b6adbd
2597
2455
2012-01-27T12:42:05Z
EXt
1
wikitext
text/x-wiki
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
This helps with two problems:
# Library versions, if a library has changed its version number but the change is ABI compatible with libfoo.so a simple rebuild of app will resolve this (just as rebuilding source-based packages)
# Library path issues, some distributions place libraries in non-standard locations and maybe a dependency is installed by the user in their home-directory. This can also be fixed using symlinks or by fiddling with LD_LIBRARY_PATH but deferred linking is better in long term.
<codebox filename="app.c">
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</codebox>
<codebox filename="foo.h">
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</codebox>
<codebox filename="foo.c">
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
return 0;
}
</codebox>
<codebox filename="Makefile" lang="bash">
all: app
libfoo.so: CFLAGS+=-fPIC
libfoo.so: foo.o
$(CC) -shared $(LDFLAGS) foo.o -o libfoo.so
app: app.o libfoo.so
$(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app
%.o : %.c
$(CC) -Wall $(CFLAGS) -c $< -o $@
clean:
rm -rf *.so *.o app
</codebox>
[[Category:Linux]]
[[Category:Programming]]
4afd9eb9d4bd99fe77e3c77198b34dde8e5d2650
2455
2412
2010-12-27T11:59:58Z
EXt
1
proper codebox
wikitext
text/x-wiki
<codebox title="app.c">
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</codebox>
<codebox title="foo.h">
<code>
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</codebox>
<codebox title="foo.c">
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
<nowiki>cinfo.err = jpeg_std_error(&jerr);</nowiki>
<nowiki>jpeg_create_compress(&cinfo);</nowiki>
return 0;
}
</codebox>
<codebox title="Makefile">
all: app
libfoo.so: CFLAGS+=-fPIC
libfoo.so: foo.o
$(CC) -shared $(LDFLAGS) foo.o -o libfoo.so
app: app.o libfoo.so
$(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf *.so *.o app
</codebox>
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
This helps with two problems:
# Minor ABI breakages, if a library has changed its version number but the change is compatible with libfoo.so a simple rebuild of app resolved this (just as rebuilding source-based packages)
# Library path issues, some distributions place libraries in non-standard locations and maybe a dependency is installed by the user eg. in home-directory. Normally this would cause issues resolved by either adding symlinks or fiddling with LD_LIBRARY_PATH.
2fcb56b578de7d966beb2c2a8527c5a4ece3b47d
2412
2411
2010-11-09T10:40:00Z
EXt
1
wikitext
text/x-wiki
{{Box code|app.c|
<code>
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</code>
}}
{{Box code|foo.h|
<code>
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</code>
}}
{{Box code|foo.c|
<code>
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
<nowiki>cinfo.err = jpeg_std_error(&jerr);</nowiki>
<nowiki>jpeg_create_compress(&cinfo);</nowiki>
return 0;
}
</code>
}}
{{Box code|Makefile|
<code>
<nowiki>all: app</nowiki>
<nowiki>libfoo.so: CFLAGS+=-fPIC</nowiki>
<nowiki>libfoo.so: foo.o</nowiki>
<nowiki> $(CC) -shared $(LDFLAGS) foo.o -o libfoo.so</nowiki>
<nowiki>app: app.o libfoo.so</nowiki>
<nowiki> $(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app</nowiki>
<nowiki>%.o : %.c</nowiki>
<nowiki> $(CC) $(CFLAGS) -c $< -o $@</nowiki>
<nowiki>clean:</nowiki>
<nowiki> rm -rf *.so *.o app</nowiki>
</code>
}}
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
This helps with two problems:
# Minor ABI breakages, if a library has changed its version number but the change is compatible with libfoo.so a simple rebuild of app resolved this (just as rebuilding source-based packages)
# Library path issues, some distributions place libraries in non-standard locations and maybe a dependency is installed by the user eg. in home-directory. Normally this would cause issues resolved by either adding symlinks or fiddling with LD_LIBRARY_PATH.
ec68c368aab58ff8370d1940e425c5e9d4a2f716
2411
2410
2010-11-09T10:32:23Z
EXt
1
short note
wikitext
text/x-wiki
{{Box code|app.c|
<code>
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</code>
}}
{{Box code|foo.h|
<code>
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</code>
}}
{{Box code|foo.c|
<code>
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
<nowiki>cinfo.err = jpeg_std_error(&jerr);</nowiki>
<nowiki>jpeg_create_compress(&cinfo);</nowiki>
return 0;
}
</code>
}}
{{Box code|Makefile|
<code>
<nowiki>all: app</nowiki>
<nowiki>libfoo.so: CFLAGS+=-fPIC</nowiki>
<nowiki>libfoo.so: foo.o</nowiki>
<nowiki> $(CC) -shared $(LDFLAGS) foo.o -o libfoo.so</nowiki>
<nowiki>app: app.o libfoo.so</nowiki>
<nowiki> $(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app</nowiki>
<nowiki>%.o : %.c</nowiki>
<nowiki> $(CC) $(CFLAGS) -c $< -o $@</nowiki>
<nowiki>clean:</nowiki>
<nowiki> rm -rf *.so *.o app</nowiki>
</code>
}}
libfoo.so may be distributed as a binary package and app.c foo.h would be distributed as source-code and built on the clients. libfoo.so has unresolved references which is resolved when building app on the client.
33e5a87fa53d9ac283cc725a3696c5960432aae2
2410
2010-11-09T10:30:24Z
EXt
1
code
wikitext
text/x-wiki
{{Box code|app.c|
<code>
#include "foo.h"
int main(int argc, const char* argv[]){
return real_main(argc, argv);
}
</code>
}}
{{Box code|foo.h|
<code>
#ifndef __FOO_H
#define __FOO_H
int real_main(int argc, const char* argv[]);
#endif /* __FOO_H */
</code>
}}
{{Box code|foo.c|
<code>
#include "foo.h"
#include <stdio.h>
#include <jpeglib.h>
int real_main(int argc, const char* argv[]){
printf("in real_main\n");
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
<nowiki>cinfo.err = jpeg_std_error(&jerr);</nowiki>
<nowiki>jpeg_create_compress(&cinfo);</nowiki>
return 0;
}
</code>
}}
{{Box code|Makefile|
<code>
<nowiki>all: app</nowiki>
<nowiki>libfoo.so: CFLAGS+=-fPIC</nowiki>
<nowiki>libfoo.so: foo.o</nowiki>
<nowiki> $(CC) -shared $(LDFLAGS) foo.o -o libfoo.so</nowiki>
<nowiki>app: app.o libfoo.so</nowiki>
<nowiki> $(CC) $(LDFLAGS) app.o -Wl,-rpath,. -L. -lfoo -ljpeg -o app</nowiki>
<nowiki>%.o : %.c</nowiki>
<nowiki> $(CC) $(CFLAGS) -c $< -o $@</nowiki>
<nowiki>clean:</nowiki>
<nowiki> rm -rf *.so *.o app</nowiki>
</code>
}}
63a30326f8fb3d41a1d017af11e4ebd3981367a5
Load BMP data (for heightmaps etc)
0
1366
2628
2477
2012-01-27T13:03:16Z
EXt
1
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorithm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<codebox>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</codebox>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<codebox>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
};
</codebox>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<codebox>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</codebox>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
[[Category:OpenGL]]
fd6da9c6bfa56987ea3e63f5f2405878f8ac9fda
2477
2476
2010-12-29T16:43:48Z
195.178.166.35
0
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorithm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<codebox>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</codebox>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<codebox>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
};
</codebox>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<codebox>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</codebox>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
9f2dff2ca867030439e94b68bef6a7fd06047330
2476
2301
2010-12-29T16:43:10Z
195.178.166.35
0
proper codebox
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorithm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<codebox>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</codebox>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<codebox>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
};
<codebox>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<codebox>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</codebox>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
f70e7655529c8354e8ca66eccde87b8acdfa2a72
2301
2225
2009-01-10T23:26:06Z
82.227.117.120
0
/* Overview */
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorithm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<code>
<cpp/>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</code>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<code>
<cpp/>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
};
</code>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<code>
<cpp/>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</code>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
e3a0e111bf04f24d530f15a56566773d18203048
2225
1380
2008-06-11T14:45:32Z
92.101.145.119
0
/* Reading the header */
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorothm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<code>
<cpp/>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</code>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<code>
<cpp/>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
};
</code>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<code>
<cpp/>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</code>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
57248dd0a87a62a8cb2d54dca59cd8cb86cd6202
1380
1379
2006-05-06T13:51:21Z
EXt
1
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorothm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 || 4 || Size of image data, may be zero if no compression is used || Integer
|-
| 0x26 - 0x29 || 4 || Horizontal resolution of the image || Integer
|-
| 0x2A - 0x2D || 4 || Vertical resolution of the image || Integer
|-
| 0x2E - 0x31 || 4 || Number of color indexes actually used, if set to zero all colors is used || Integer
|-
| 0x32 - 0x35 || 4 || Nr of colors indexes required to render the image, if set to zero all color is used || Integer
|-
| 0x36 - || 4 || Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero) ||
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<code>
<cpp/>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</code>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<code>
<cpp/>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
}
</code>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<code>
<cpp/>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</code>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
326b3fffb63ddcc3cfb9feaa10869ab87daf6c3d
1379
1378
2006-05-06T13:47:40Z
EXt
1
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorothm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x0E - 0x11 || 4 || Size of the image header, must be 40 (0x28) || Integer
|-
| 0x12 - 0x15 || 4 || Image width in pixels || Integer
|-
| 0x16 - 0x19 || 4 || Image height in pixels || Integer
|-
| 0x1A - 0x1B || 4 || Nr of planes, must be one || Integer
|-
| 0x1C - 0x1D || 4 || Bits per pixel, must be 1,2,4,8,16,24 or 32 || Integer
|-
| 0x1E - 0x21 || 4 || Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette. ||
|-
| 0x22 - 0x25 4 Size of image data, may be zero if no compression is used Integer
|-
| 0x26 - 0x29 4 Horizontal resolution of the image Integer
|-
| 0x2A - 0x2D 4 Vertical resolution of the image Integer
|-
| 0x2E - 0x31 4 Number of color indexes actually used, if set to zero all colors is used Integer
|-
| 0x32 - 0x35 4 Nr of colors indexes required to render the image, if set to zero all color is used Integer
|-
| 0x36 - 4 Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero)
|}
=== Reading the header ===
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
<code>
<cpp/>
typedef struct Bitmap {
int offset;
int width;
int height;
int bpp;
int encoding;
int size;
bool loaded;
unsigned char* pData;
};
</code>
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
<code>
<cpp/>
enum BITMAP_RESULTS {
BMP_OK,
BMP_NO_FILE,
BMP_INVALID_HEADER,
BMP_OUT_OF_MEMORY,
BMP_UNSUPPORTED,
BMP_LOADED,
}
</code>
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
<code>
<cpp/>
#include <fstream>
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
</code>
=== Loading 8-bit monocrome image ===
TBD
=== Loading 24-bit truecolor image ===
TBD
=== Summary ===
TBD
486df55564194827ff39e678b6f1eda0193e2df7
1378
1377
2006-05-06T13:37:09Z
EXt
1
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorothm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|-
| 0x06 - 0x07 || 4 || Reserved, must be zero ||
|-
| 0x08 - 0x09 || 4 || Reserved, must be zero ||
|-
| 0x0A - 0x0D || 4 || Offset to pixeldata || Integer
|}
==== Image header ====
Offset Bytes Description C/C++ datatype
0x0E - 0x11 4 Size of the image header, must be 40 (0x28) Integer
0x12 - 0x15 4 Image width in pixels Integer
0x16 - 0x19 4 Image height in pixels Integer
0x1A - 0x1B 4 Nr of planes, must be one Integer
0x1C - 0x1D 4 Bits per pixel, must be 1,2,4,8,16,24 or 32 Integer
0x1E - 0x21 4 Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette.
0x22 - 0x25 4 Size of image data, may be zero if no compression is used Integer
0x26 - 0x29 4 Horizontal resolution of the image Integer
0x2A - 0x2D 4 Vertical resolution of the image Integer
0x2E - 0x31 4 Number of color indexes actually used, if set to zero all colors is used Integer
0x32 - 0x35 4 Nr of colors indexes required to render the image, if set to zero all color is used Integer
0x36 - 4 Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero)
Reading the header
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
typedef struct Bitmap { int offset; int width; int height; int bpp; int encoding; int size; bool loaded; unsigned char* pData; };
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
enum BITMAP_RESULTS {
BMP_OK, BMP_NO_FILE, BMP_INVALID_HEADER, BMP_OUT_OF_MEMORY, BMP_UNSUPPORTED, BMP_LOADED, }
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
* nclude
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
Loading 8-bit monocrome image
TBD
Loading 24-bit truecolor image
TBD
Summary
TBD
9b214b7497fd70325e1377c98980cf932fb5e00c
1377
2006-05-06T13:34:31Z
EXt
1
wikitext
text/x-wiki
=== Overview ===
BMP is a simple image format developed by Microsoft. The colordepth wary between 2 (1-bit), 16 (4-bit), 256 (8-bit), 16-bit and 24-bit. The image is usually not compressed, but it might be compressed with the RLE algorothm. This tutorial will cover how to read pixels from a BMP image into an 2-dimensional array.
=== File format ===
==== File header ====
{|
! Offset !! Bytes !! Description !! C/C++ datatype
|-
| 0x00 - 0x01 || 2 || This bytes must contain the ASCII character 'B' and 'M' || Char
|-
| 0x02 - 0x05 || 4 || Size of the file in bytes || Integer
|}
Offset Bytes Description C/C++ datatype
0x00 - 0x01 2 This bytes must contain the ASCII character 'B' and 'M' Char
0x02 - 0x05 4 Size of the file in bytes Integer
0x06 - 0x07 4 Reserved, must be zero
0x08 - 0x09 4 Reserved, must be zero
0x0A - 0x0D 4 Offset to pixeldata Integer
Image header
Offset Bytes Description C/C++ datatype
0x0E - 0x11 4 Size of the image header, must be 40 (0x28) Integer
0x12 - 0x15 4 Image width in pixels Integer
0x16 - 0x19 4 Image height in pixels Integer
0x1A - 0x1B 4 Nr of planes, must be one Integer
0x1C - 0x1D 4 Bits per pixel, must be 1,2,4,8,16,24 or 32 Integer
0x1E - 0x21 4 Compression
0 = No compression
1 = RLE compression for 8bit bitmaps
2 = RLE compression for 4bit bitmaps Integer
Following fields may be ignored most of the time. They is used to describe and store the palette.
0x22 - 0x25 4 Size of image data, may be zero if no compression is used Integer
0x26 - 0x29 4 Horizontal resolution of the image Integer
0x2A - 0x2D 4 Vertical resolution of the image Integer
0x2E - 0x31 4 Number of color indexes actually used, if set to zero all colors is used Integer
0x32 - 0x35 4 Nr of colors indexes required to render the image, if set to zero all color is used Integer
0x36 - 4 Optional: This part may contain the palette used by the image.
The format is RGBx (x is 1 byte reserved, must be set to zero)
Reading the header
The first step to read our image is to read its header to find out its size,bits-per-pixel and encoding. We will begin by making a simple struct to hold our data and a couple of enumerations for eventual errors. Lets start with struct.
typedef struct Bitmap { int offset; int width; int height; int bpp; int encoding; int size; bool loaded; unsigned char* pData; };
For now this is all we need to store, but we will add more later. I don't think any of these need any further explanation.
enum BITMAP_RESULTS {
BMP_OK, BMP_NO_FILE, BMP_INVALID_HEADER, BMP_OUT_OF_MEMORY, BMP_UNSUPPORTED, BMP_LOADED, }
The first enum simply indicates everythings good soo far. BMP_NO_FILE means the file could not be opened, most likely the file doesn't exist but it might be permission error. BMP_INVALID_HEADER tells us the file isn't a valid BMP file, either it doesn't start with BM or the length is wrong. BMP_OUT_OF_MEMORY is self explanary. BMP_UNSUPPORTED is going to be used when the bpp has weired modes and/or encodings. The last one, BMP_LOADED, is used when there is already a bitmap loaded.
In order to read the header we first need to load the file into memory:
* nclude
using namespace std;
int loadBMP(Bitmap* img,char* filename){
ifstream::pos_type size
ifstream file(filename, ios::in|ios::binary|ios::ate);
if(file.is_open()){
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
}
}
Loading 8-bit monocrome image
TBD
Loading 24-bit truecolor image
TBD
Summary
TBD
78724d46783c754e15ac79486c6283ca08a56436
MSVC/Solution layout
0
1590
2667
2666
2012-02-27T20:12:19Z
EXt
1
wikitext
text/x-wiki
* $(SolutionDir)
** $(Configuration)
*** $(ProjectDir)
**** intermediate files goes here
*** output files goes here
** $(ProjectDir)
*** project files goes here
** solution files goes here
== Files to ignore in VCS ==
* Debug
* Release
* ipch
* *.user
* *.suo
* *.sdf
* *.opensdf
[[Category:MSVC]]
26d7c2d7bc9c01f7dc35f774a13ac32b8c65a36f
2666
2012-02-27T14:40:49Z
EXt
1
Created page with "* $(SolutionDir) ** $(Configuration) *** $(ProjectDir) **** intermediate files goes here *** output files goes here ** $(ProjectDir) *** project files goes here ** solution files..."
wikitext
text/x-wiki
* $(SolutionDir)
** $(Configuration)
*** $(ProjectDir)
**** intermediate files goes here
*** output files goes here
** $(ProjectDir)
*** project files goes here
** solution files goes here
== Files to ignore in VCS ==
* Debug
* Release
* ipch
* *.user
* *.suo
* *.sdf
* *.opensdf
d639599b5dbdb179bfd3d3a00ab8a56cb9f973ea
MSVC/What I hate about MSVC
0
1495
2737
2736
2012-10-13T22:12:11Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far, ERROR etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream[http://stackoverflow.com/questions/2864178/equivalent-of-open-memstream-for-msvc], and even fopencookie/funopen[http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/10053a26-7437-4fc4-8ac9-7e6f3308ec0c].
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
* <s>No range-based for</s>. (implemented in vs2012)
* Variable-sized arrays (it is a gcc extension but a really useful one)
* <pre>warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.</pre>So replacing ''strdup'' with ''_strdup'' didn't really help. Wonderful.
6f43c7a0a4e89e06d0ffef067d735e717623c8f0
2736
2735
2012-10-13T22:09:35Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far, ERROR etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream[http://stackoverflow.com/questions/2864178/equivalent-of-open-memstream-for-msvc], and even fopencookie/funopen[http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/10053a26-7437-4fc4-8ac9-7e6f3308ec0c].
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
* No range-based for.
* Variable-sized arrays (it is a gcc extension but a really useful one)
* <pre>warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.</pre>So replacing ''strdup'' with ''_strdup'' didn't really help. Wonderful.
23b16af83c9f83e6b61d57d4b0ae25843ac17dab
2735
2664
2012-10-13T22:09:16Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream[http://stackoverflow.com/questions/2864178/equivalent-of-open-memstream-for-msvc], and even fopencookie/funopen[http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/10053a26-7437-4fc4-8ac9-7e6f3308ec0c].
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
* No range-based for.
* Variable-sized arrays (it is a gcc extension but a really useful one)
* <pre>warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.</pre>So replacing ''strdup'' with ''_strdup'' didn't really help. Wonderful.
9ce863e6b8568f08d39269528fb42140de4f8922
2664
2367
2012-02-27T13:31:08Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream[http://stackoverflow.com/questions/2864178/equivalent-of-open-memstream-for-msvc], and even fopencookie/funopen[http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/10053a26-7437-4fc4-8ac9-7e6f3308ec0c].
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
* No range-based for.
* Variable-sized arrays (it is a gcc extension but a really useful one)
d2c61c63957b6315befe27bda3a568a426876ee7
2367
2366
2010-05-20T06:12:43Z
EXt
1
adding links as reference
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream[http://stackoverflow.com/questions/2864178/equivalent-of-open-memstream-for-msvc], and even fopencookie/funopen[http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/10053a26-7437-4fc4-8ac9-7e6f3308ec0c].
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
4ae8edebc928cb8bc6b072b15eb1683c2780c29e
2366
2365
2010-05-19T15:49:11Z
EXt
1
reorder
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing {,v}asprintf and v{,s,f}scanf.
* Missing fmemopen and open_memstream, and even fopencookie/funopen.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
017798fea7bc38b7dca8d70e615f94037d8e22a8
2365
2359
2010-05-19T15:47:04Z
EXt
1
missing open_memstream and all options to implement a similar function
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf and v{,s,f}scanf.
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
* Missing fmemopen and open_memstream, and even fopencookie/funopen.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
855fb45d833f59eb24fdab56daec0a62cb495a66
2359
2358
2010-03-27T11:21:27Z
EXt
1
doesn't preserve line-endings
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf and v{,s,f}scanf.
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
* Does not preserve line-endings. It correctly detects which line-ending the file has but doesn't preserve it.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
739e6a79e576a3a87fc4321166293cd3ed295aab
2358
2355
2010-03-16T18:19:22Z
EXt
1
*sigh* missing vscanf too
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf and v{,s,f}scanf.
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
2ac9775f0d5309f45db9de3b5d03e0c7d2b6c118
2355
2354
2010-02-17T10:42:44Z
EXt
1
winsock2
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Certain headers, like ''ws2tcpip.h'', must be included before ''windows.h'' or the world will explode.
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
b38e8ac751ca1b68f0beed4e875b8f2507544f4d
2354
2353
2010-02-05T12:15:30Z
EXt
1
bug in VS2008
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
* While it does detect external changes in files, the dependency tracker does not and will not rebuild the affected files until the file has been modified from within the IDE.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
cefc4cdc96540e2b174d486863ed96639a359ccd
2353
2352
2010-01-29T22:53:23Z
EXt
1
wtf...
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
* Doesn't handle multiple files with the same filename (in different directories), only compiles one of them, whichever comes first.
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
88598a83ca6b59f9ae436c30fd399a3f4cb1f078
2352
2351
2010-01-27T12:10:06Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
== Compiler ==
* Missing support for C99.
* Preprocessor missing #warning
e6f2f0d222763a5c0dd3d02d599404bf8f9cdc01
2351
2350
2010-01-21T14:57:31Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: '''windows.h'''
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
1c6df8ade3afa6fffec69a3c490b4cdfeba27050
2350
2349
2010-01-21T14:57:14Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* the monolithic evil header: windows.h
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
a572587caebf3b78341553742315716ab0dda5a7
2349
2348
2010-01-21T13:58:16Z
EXt
1
wikitext
text/x-wiki
== Standard library ==
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
* Since the addition of deprecating POSIX names for standard library routines (like strdup) makes targeting *nix, win32 and wince troublesome. I can live with the fact that targeting win32 makes it warn (possible to disable) but wince enforces it. To workaound this issue one must "#define snprintf _snprintf". Things would also be better if wince had the security enhanced version, that would at least give it some purpose.
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
167efb20d0117a48fdd2fb49f4976fe11fda9c31
2348
2344
2010-01-21T13:48:14Z
EXt
1
more hate
wikitext
text/x-wiki
== Standard library ==
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
== IDE ==
* Fail at detecting interproject dependencies, sometimes need multiple builds until succeeds. Probably related to multicore compiling (guessing that it doesn't wait until all targets are complete.)
* Also for reasons unknown, sometimes closes all panels (solution explorer, output window, debug windows) but opens the breakpoint view floating in the middle of the screen. (The more instances of VS running increases the chance of this happening, moving a floating window to another monitor also increase the chance)
82d9ab9a12dac0b784a0977ae45e158eceee51d2
2344
2343
2009-12-10T09:14:18Z
EXt
1
wikitext
text/x-wiki
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
* Missing {,v}asprintf
fe877e0e36e74b660ed73a132383ece76bcc9146
2343
2341
2009-12-08T10:59:20Z
EXt
1
wikitext
text/x-wiki
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
* '''Missing stdint.h''' (even more problems when different third-party libraries uses different but similar definitions of the types provided by stdint.h, eg. including headers from two libraries may not work (sdl+ffmpeg for instance))
6fa13f4ce3cd0c234f6ebbee2e7df433bfe28171
2341
2340
2009-12-06T16:19:01Z
EXt
1
wikitext
text/x-wiki
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defines min, max, near, far etc.
* Missing support for C99.
f97254252d8840d367634a01cd5c7a3b6b686c33
2340
2339
2009-12-06T16:14:27Z
EXt
1
wikitext
text/x-wiki
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defined min, max, near, far etc.
* Missing support for C99.
eaadac1920cef0da473d6bc307f6e9b8fb14cbb2
2339
2009-11-30T14:16:10Z
EXt
1
New page: * Missing support for z-length modifier (size_t) for printf and friends. * windows.h defined min, max, near, far etc.
wikitext
text/x-wiki
* Missing support for z-length modifier (size_t) for printf and friends.
* windows.h defined min, max, near, far etc.
d58f5ac882321f4b8c8f303f861b7d31a0e8970b
Magento/What I hate about Magento
0
1835
3052
3051
2015-08-10T12:23:09Z
EXt
1
/* Magento product (SOAP) API Custom options madness */
wikitext
text/x-wiki
== Magento product (SOAP) API Custom options madness ==
<small>Last seen in 1.9.1</small>
Magento has a "nice" API for managing products, for instance if you want to bulk create products from a script you might run into situations where you should add custom options. No problem you think, "''I just use <code>Mage::getModel('catalog/product_option_api');</code><ref>http://www.magentocommerce.com/api/soap/catalog/catalogProductCustomOption/catalogProductCustomOption.html</ref> so I don't have to deal with any messy details!''"
That is fine until you realize Magento stores the options globally so each iteration you add/update the options they keep accumulating so in the end your product may have thousands of options when you only wanted one.
The solution is to call <code>Mage::getSingleton('catalog/product_option')->unsetOptions();</code><ref>http://magento.stackexchange.com/a/9661/6262</ref> for each iteration to reset. Very intuitive and well-documented!
== References ==
<references />
[[Category:Magento]]
9b935f938e8fd5a57dde02b4f307ad9acf099da8
3051
3050
2015-08-10T12:22:22Z
EXt
1
wikitext
text/x-wiki
== Magento product (SOAP) API Custom options madness ==
Magento has a "nice" API for managing products, for instance if you want to bulk create products from a script you might run into situations where you should add custom options. No problem you think, "''I just use <code>Mage::getModel('catalog/product_option_api');</code><ref>http://www.magentocommerce.com/api/soap/catalog/catalogProductCustomOption/catalogProductCustomOption.html</ref> so I don't have to deal with any messy details!''"
That is fine until you realize Magento stores the options globally so each iteration you add/update the options they keep accumulating so in the end your product may have thousands of options when you only wanted one.
The solution is to call <code>Mage::getSingleton('catalog/product_option')->unsetOptions();</code><ref>http://magento.stackexchange.com/a/9661/6262</ref> for each iteration to reset. Very intuitive and well-documented!
== References ==
<references />
[[Category:Magento]]
960dc0064a1c99a4750c58863a35d69aaedbf0f5
3050
2015-08-10T12:20:22Z
EXt
1
Created page with "== Magento product (SOAP) API Custom options madness == Magento has a "nice" API for managing products, for instance if you want to bulk create products from a script you mig..."
wikitext
text/x-wiki
== Magento product (SOAP) API Custom options madness ==
Magento has a "nice" API for managing products, for instance if you want to bulk create products from a script you might run into situations where you should add custom options. No problem you think, "''I just use <code>Mage::getModel('catalog/product_option_api');</code><ref>http://www.magentocommerce.com/api/soap/catalog/catalogProductCustomOption/catalogProductCustomOption.html</ref> so I don't have to deal with any messy details!''"
That is fine until you realize Magento stores the options globally so each iteration you add/update the options they keep accumulating so in the end your product may have thousands of options when you only wanted one.
The solution is to call <code>Mage::getSingleton('catalog/product_option')->unsetOptions();</code><ref>http://magento.stackexchange.com/a/9661/6262</ref> for each iteration to reset. Very intuitive and well-documented!
== References ==
<references />
fb5349937e168832f4d9acbb6589d18c37bf49ee
Main Page
0
1
3099
3093
2018-12-02T21:20:28Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small personal wiki.
'''Please feel free to write your own articles and/or edit mine.'''.
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
* [[Ansible]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://html-validate.org/ html-validate] - Offline HTML validator ([https://www.npmjs.com/package/html-validate npm])
8581da17fd74fdd35535ea5413e21a45be3cc2a6
3093
3053
2017-10-30T12:17:57Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small personal wiki.
'''Please feel free to write your own articles and/or edit mine.'''.
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
* [[Ansible]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://html-validate.sidvind.com/ html-validate] - Offline HTML validator
9de0c05419d16f02fd00a914da775f3f1ce16d8f
3053
3037
2016-05-07T13:36:24Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small personal wiki.
'''Please feel free to write your own articles and/or edit mine.'''.
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
* [[Ansible]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://blog.blueflower.eu blueflower]
373ac36c0c85e05a8b1a1b936ee40a78137085da
3037
3035
2015-08-07T23:36:05Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small personal wiki.
'''Please feel free to write your own articles and/or edit mine.'''.
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://blog.blueflower.eu blueflower]
212b697ad70ee995b677959648cb21b67f5d6f40
3035
3034
2015-07-15T14:46:49Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small personal wiki.
'''Please feel free to write your own articles and/or edit mine.'''.
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://blog.blueflower.eu blueflower]
8c843f5c5250e9c3ad8ef286c5665db9617e7013
3034
3033
2015-07-15T14:44:48Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://blog.blueflower.eu blueflower]
4d9db216ea07b01bf4ba54086a7d2078772c099b
3033
3032
2015-07-15T14:43:29Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [https://github.com/ext/slideshow Slideshow] - Kiosk-style information display.
* [https://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [https://github.com/ext/pylistener pylistener] - easy observable pattern.
* [https://blog.blueflower.eu blueflower]
== [[Ideabox]] ==
* [[Wanted articles]]
66b163234165a591e868422a83fb6e9944aab3fe
3032
3030
2015-07-15T14:37:39Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a55b69179c4fb2c67427e8e424295647d409c2fb
3030
2759
2015-07-15T14:15:22Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
8173a6de6e84b5a9362ff6300c8437f95922e19b
2759
2729
2013-05-15T18:24:30Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Windows/Share Putty key with Cygwin]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
d6e7b67274fc957a399d981aa78a974596452283
2729
2673
2012-09-22T22:13:53Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[PHP/What I hate about PHP]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
5f8cc502d6d10f39fb6a00c82e892cfe1c2f0b9e
2673
2665
2012-03-22T10:06:40Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount|Linux filesystem mount]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
ed173b587e23ed3d448ae6ee2461c2ec607c5e84
2665
2658
2012-02-27T14:35:38Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/Solution layout]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
aa42f2c3c7a41f631bc2c26ca5e8a18b4719bc88
2658
2655
2012-02-06T16:58:52Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
* [[GCC/Function alias]]
* [[Unittest replacement function in library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
57838da139b3bcb850d1cf6b71a0a20477194157
2655
2650
2012-02-06T16:12:26Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
* [[GCC/Function alias]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
7202dca89fa373a86375e8b2b6f58301b3bfd0ba
2650
2647
2012-02-01T18:49:22Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
* [[Youtube Rickroll Proxy]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
7086d12c6829f95062fd358173c0e946865f0d5c
2647
2624
2012-01-30T12:59:05Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo/Portage]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
4be73e17de2474ec28454ef739ff46663b0292d2
2624
2620
2012-01-27T13:01:23Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[mount tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a1a0049a6dabcd5749c0757140d78513a9fbd299
2620
2589
2012-01-27T12:56:39Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[GRUB: Restore GRUB]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
83de3b9bc3bd7906d9b05c6188990c8221c7552e
2589
2586
2012-01-25T16:02:32Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
* [[Subversion/Migrating part of repository]]
* [[Subversion/Pre-commit prevent changes to directory]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
eee5ab6305ee05a5ac2ee6098b1cc67e5dd93d9d
2586
2576
2012-01-12T16:40:15Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
* [[libtool gdb]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
6f76f23ed1a013943b038e1d962246a637e539ae
2576
2573
2012-01-08T00:55:30Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot/Ubuntu]]
* [[Netboot/Windows 7]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
9204e93c49d68401646e153f59d458e5a9e8f735
2573
2566
2012-01-08T00:54:46Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot Ubuntu]]
* [[Netboot/Windows 7]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
56dc8881c2e2d1ed46299f4226ef88185c88b38f
2566
2562
2012-01-08T00:13:28Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot Ubuntu]]
* [[Netboot\Windows 7]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
5b8d78fca3b7676fbd5fa886b6d4c7a7ffc2114e
2562
2559
2012-01-07T23:28:53Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot Ubuntu]]
* [[Netboot\Windows]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
e71f036f608d4cfddfcfed8de0fce97e1d08c30a
2559
2557
2012-01-04T01:23:56Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
* [[Netboot Ubuntu]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
566e122f6d974011c8a59a3912058bc1fed6c2ab
2557
2508
2011-12-14T15:20:15Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[mount bind]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
df10e328187d176cbc3453544a8be3e34ab5669b
2508
2507
2011-07-09T19:28:39Z
EXt
1
Reverted edits by [[Special:Contributions/Taikath|Taikath]] ([[User talk:Taikath|talk]]) to last revision by [[User:EXt|EXt]]
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
164e1ddd1e81740bc2d8c952b24ba04583406e53
2507
2486
2011-07-09T16:11:52Z
Taikath
91
wikitext
text/x-wiki
==<center></center>==
.
.
.
.
==<center>[http://acceptsearch.com/forum/redirect.php?topic=nh6OTN8fDEzMTAwMTYyMzV8fDE5MDZ8fChFTkdJTkUpIE1lZGlhV2lraQ%3D%3D&s= <big>'''<u></u>'''</big>]</center>==
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
:
----
==== ====
*
**
***
===== =====
''''''''''
''''
<pre style="color:blue"></pre>
#
#
#
#
#
a71376543e
====== External links ======
[http://en.wikipedia.org Wikipedia]
2c091f57305faa0d71880b335a18fc3b5b5b6d53
2486
2484
2011-02-21T18:06:52Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
164e1ddd1e81740bc2d8c952b24ba04583406e53
2484
2409
2011-02-18T12:37:03Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
* [[Sort folders by size]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
82f38668b963d6c59f9dc78888dc37fea943ccae
2409
2399
2010-11-09T10:22:30Z
EXt
1
new page
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
* [[Linking/Deferred linking for binary packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
196f2ea63383451d05a5a1099ad5dce3b80c5f49
2399
2398
2010-08-03T14:09:09Z
EXt
1
Time to start a java hate page as well.
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
* [[Java/What I hate about Java]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
01cb8df5d6a49a2d3abacb61026cda7cdb4e7c60
2398
2394
2010-07-22T21:41:21Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow] - Kiosk-style information display.
* [http://github.com/ext/pyhtmlcolor pyhtmlcolor] - parse html/css colors.
* [http://github.com/ext/pylistener pylistener] - easy observable pattern.
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a5f0d76bebce8198a63666dd56f4cfede312d6a4
2394
2393
2010-07-13T18:14:56Z
83.209.89.65
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a88c0023542601d9541a5f5e736d779358997982
2393
2392
2010-07-13T18:11:26Z
83.209.89.65
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
d9e21835579b9ca63ca29ad5b3c9bf1f21ac8feb
2392
2391
2010-07-13T17:40:57Z
83.209.89.65
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a88c0023542601d9541a5f5e736d779358997982
2391
2378
2010-07-13T17:34:47Z
83.209.89.65
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
27ede536e5e54d3ce3698de85f7224e4d5210a08
2378
2368
2010-05-25T18:10:14Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[opengl/windowless|"Windowsless" OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a88c0023542601d9541a5f5e736d779358997982
2368
2338
2010-05-24T14:12:58Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[glx/windowless_opengl|GLX Windowsless OpenGL]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
e441c8be4adf63cc10281702858f5a7b1faed741
2338
2330
2009-11-30T14:14:39Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
* [[MSVC/What I hate about MSVC]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
a4abbb8836d57b6c4c324e76c9396632bedb4a56
2330
2329
2009-06-15T11:14:03Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[OSX/Environment]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
e912c365a173a1ad282e2d0ac8e91796ea805fc7
2329
2327
2009-06-15T07:21:46Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [http://blog.blueflower.eu blueflower]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
4726353fceda85db3da1aacd7f2830faf08ace02
2327
2314
2009-06-03T10:41:40Z
194.47.147.105
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
* [[ssh/Terminate frozen session|Terminate a frozen ssh session]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
aab659c879a4952d51ab8fb89253e03bd77c9053
2314
2310
2009-02-23T18:35:42Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[GRUB: Recover root password]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
3705b0721c5f8975f3462445b18bf1f041a54644
2310
2308
2009-02-13T18:35:29Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[OSX/Pkg packages]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
685ddf141f8c05b0cd258f52e9cf68a31d4497be
2308
2305
2009-02-12T17:59:51Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[Gentoo/Oneliners]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
31e152267778e882d72b64020151d232b5a7661f
2305
2289
2009-01-19T19:54:13Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome to my small programming wiki. I used to study game development at [http://www.bth.se Blekinge Institute of Technology] but nowadays I work there as a project assistant instead while waiting for enough motivation to graduate. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to these subjects but there is also some other content.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
d84f6db31d1a879183370269ab1b47ddf0f4430e
2289
2284
2009-01-06T09:32:11Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== cairo+glitz ===
* [[cairo+glitz/Setup glitz with glx]]
* [[cairo+glitz/Setup cairo]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
b21ba011589b474d8be002712f425a71039380ac
2284
2281
2008-10-22T10:24:32Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
* [[OSX/Building shared library]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
bca7175c010488827292a69b5ece9983bfc53fbc
2281
2275
2008-08-25T10:36:05Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird/Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
7ed37266045386276e2b1c34dd264b7ba82582a7
2275
2270
2008-08-19T16:45:12Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Subversion/Migrating part of repository]]
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
f069b3de65f14956e6c36febd1a42342b1e4dab0
2270
2268
2008-08-18T09:55:28Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
* [[Programming/Calling conventions|Calling conventions]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
1986097da894da05b89010002fbf3d60d40b0047
2268
2267
2008-07-13T21:26:34Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
* [[tmpfs]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
755eddfa49209cef88e6c4052ef8f82285df58d5
2267
2227
2008-07-07T01:30:24Z
EXt
1
https
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
HTTPS is now available, [https://sidvind.com try it out]. Please accept the root certificate at [http://www.cacert.org/index.php?id=3 www.cacert.org].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
656e348791a9e9cd2a9b769404eb59085c399728
2227
2226
2008-06-17T10:00:40Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your email]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
c4f4e884245790367972cba0679e5d8b42bc3cb7
2226
2218
2008-06-17T10:00:30Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[Thunderbird/Encrypting your mail]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
905b9ff913029c403a108fcbbceb009dac840ad5
2218
2212
2008-05-19T18:46:03Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Verbose output]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
48ed4fbcf85218fa5fba6b4fd715ab4d7a6aff6c
2212
2211
2008-05-17T16:52:53Z
EXt
1
Cleanup
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
aacdb23f59e351cdc685040c5d2ca74cad3d8e90
2211
2208
2008-05-17T16:49:44Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Find library]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
fedc52bf9f80817120d32565228871d148208890
2208
2207
2008-05-11T09:08:04Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Basics]]
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
8151af5573f6be20847a8acd16c849332f73ecde
2207
2198
2008-05-10T23:29:39Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== [[Image:CMake-logo.png]] CMake ===
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
04687ca9ef64e1449272d3e62c8f01639b2c0327
2198
2194
2008-05-10T21:48:09Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== CMake ===
* [[CMake/Configuration files]]
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
1583942b6aadbc001d8faddb37cfe9bd76653304
2194
2192
2008-04-12T20:25:56Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [http://sidvind.com:8000/slideshow Slideshow]
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
661dc2ad35293e778b276a12f259acf01d42355b
2192
2173
2008-04-09T19:12:46Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
* [[DeMorgan transformations]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
353af738bb6c84bb8a4fbc924cbec68f782d1774
2173
2168
2008-02-29T15:06:46Z
194.237.142.7
0
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word, apart from sidewind.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
2bc2d2fac17a48ec70e2f74423cf973f3e66b320
2168
2153
2008-01-16T21:34:27Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
* [[Library list]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
7173520d4ce975c4c689556b2eca3456ae3a3244
2153
2151
2007-12-11T17:36:26Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
* [[Keybindings]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
ca4734b4c750839ad19a76b1ef6fdc39f2aecc30
2151
2136
2007-12-10T18:05:20Z
EXt
1
Realised that it still says that I'm a third year student
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a fourth year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
55186557da998175897fcd174a0b1a20801e73ad
2136
2132
2007-11-19T16:49:55Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
* [[Debugging]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
ad16c37e72d1b4931611f930ebb98421ebd7cfa8
2132
2122
2007-09-20T01:16:00Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [http://gunnm.sidvind.com Battle Angel Alita Wiki]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
752dfa6b39ec34d982708395fa662192e52f059a
2122
2121
2007-02-19T13:35:24Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
=== [[Image:Icon_game.png]] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== [[Image:NewTux.png]] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png]] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png]] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
d19756f772c16622838d53b36f21de44ed76d2da
2121
2111
2007-02-19T13:34:51Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== [[Image:Icon_tools.png]] General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
=== [[Image:Icon_game.png] Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== [[Image:NewTux.png] Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== [[Image:Icon_Hardware.png] OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== [[Image:Icon_formula.png] Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
cbbdbf217a7c203826cadd8c03d6c2b12db58dd6
2111
2105
2007-02-06T13:11:37Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
611b44e7fc5e4525ea3f1f663c50878d99b7951a
2105
2103
2007-02-06T12:47:04Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
* [[Boost::Python: Converting to and from custom classes]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
16f1d5f3c99ab8a1517a7b2803c4a54a65760521
2103
2101
2007-01-13T23:09:59Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: List]]
* [[Boost::Python: Dictionary]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
82dbf91c5732f845785cdc46372d7afed83ce3c4
2101
2096
2007-01-13T22:39:33Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
* [[Boost::Python: Dictionary]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
1efd6a2fab035db118b16bfdaccb272cb81e5eb0
2096
2090
2006-12-11T13:33:06Z
EXt
1
Link to new article, moved xlib articles to opengl
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
* [[Reading keycodes instead of ASCII]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
8d59c310527abc973c69c63c1306e241fd31f9b4
2090
2089
2006-11-09T15:53:06Z
EXt
1
New page
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
* [[Portfolio]]
== [[Ideabox]] ==
* [[Wanted articles]]
96be7d41fabecff1a5ab18d874101ea2c03936e7
2089
2080
2006-11-09T15:16:28Z
Chris
7
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
* [[Gentoo masked packages]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
fa4e147622241d7054e8529ddcc4cb687e4c380e
2080
2070
2006-10-11T22:45:36Z
EXt
1
Added Xlib/GLX tutorials
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[Xlib and GLX: Part 1]]
* [[Xlib and GLX: Part 2]]
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
776fc5e8c309aea76082cbeeb0af3c5186da6299
2070
2069
2006-09-24T21:19:51Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
* [[Funny spam]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
4dc41465658da97c88e43018f21d7efa63bc50fa
2069
2066
2006-09-24T21:18:01Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== http://sidvind.com/images/6/68/Icon_Hardware.png OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== http://sidvind.com/images/2/2e/Icon_formula.png Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
0d344ffa479a94281e55a08548b6e604f25d992d
2066
2062
2006-09-24T20:50:21Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== http://sidvind.com/images/8/81/Icon_tools.png General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== http://sidvind.com/images/7/7b/Icon_game.png Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== http://sidvind.com/images/a/ac/NewTux.png Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
79182112dccc0c022149dfb2498a8ec240b25cf9
2062
2059
2006-09-24T20:23:28Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
Welcome, I am a third year student at [http://www.bth.se Blekinge Institute of Technology] where I am studying game programming. Besides game development I am a dedicated Gentoo GNU/Linux user. The purpose of this site is to gather information related to those to subjects, but there is also some other articles. The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word.
'''Please feel free to write your own articles and/or edit mine.''' That's the reason this is a wiki rather than a static page. Actually, I would appreciate if some articles were written by other people than me.
Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
a70b934cc7b33bd77caa857bdc3be2eaf1bdf489
2059
2036
2006-09-24T19:39:39Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
* [[Game Objects: Inheritance VS Composition]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
629cc6fae7c75c19c1d4c71a79655f3bc0a78804
2036
2009
2006-08-31T14:50:58Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
* [[Reuse memory]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
35f16d8c0f8f1c002c5f504aee2e7a2fd395c11d
2009
2008
2006-08-20T11:12:44Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
=== Other ===
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
558ff10ab4f81b0c6934f09954a6b5cbbc5f35f3
2008
2007
2006-08-20T11:12:15Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Other ==
* [[Domain Codes]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
ad1d3225182917d369dbbcea3164bfcd355b74d9
2007
2006
2006-08-20T11:11:47Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== Other ==
* [[Domain Codes]]
== [[Ideabox]] ==
* [[Wanted articles]]
f0c7c15a8d445cfc613c6fa7dd6d05adc831f4a3
2006
2001
2006-08-16T09:33:22Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
* [[Nvidia fanspeed adjustment]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
82f2a1b7c5d3c720b2389abc5fe222432a94d9aa
2001
1999
2006-08-01T21:36:42Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math (Mostly game-related)===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[2D-Collision response]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
aa87981b37dbe70c19f7ad052c4ed56626453dcd
1999
1996
2006-07-31T21:21:30Z
EXt
1
wikitext
text/x-wiki
__NOTOC__
__NOEDITSECTION__
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
147111188839a2d660cf1ff563f9b349ac11e03c
1996
1995
2006-07-31T20:49:19Z
EXt
1
/* [[Ideabox]] */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
* [[Wanted articles]]
aac4e928a5343f9b3553411fdf8f14931531cc93
1995
1987
2006-07-31T20:48:56Z
EXt
1
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>. Logo wanted, if you want to design one send a copy to [mailto:logo@sidvind.com logo@sidvind.com].
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
d77f456244c269ee970a4f78046c08322d3f1000
1987
1972
2006-07-31T16:00:04Z
EXt
1
/* Linux */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[GRUB: Password protection]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
b555062ab33f468094e496b13d7774cb2bac2836
1972
1971
2006-07-25T11:53:08Z
EXt
1
/* Math */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
a84c723eb5a32b3ec168e2c4c37cbb618ae0b727
1971
1965
2006-07-25T11:37:09Z
EXt
1
/* Articles */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== Math ===
* [[Point-in-polygon: Jordan Curve Theorem]]
* [[Line-segment ray intersection]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
6d8be95c422704ce0868447ec762f4cd5be9b927
1965
1963
2006-07-22T08:59:34Z
EXt
1
/* OpenGL */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch, roll camera]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
1b408dccd8b1e79b39035584692bcdbefc432b80
1963
1957
2006-07-22T08:54:51Z
EXt
1
/* OpenGL */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
* [[Yaw, pitch and roll]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
78cb85623e7ac345acb7e6464c4b42233620c53f
1957
1956
2006-07-18T18:19:29Z
EXt
1
/* Linux */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[xargs by example]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
a2f48c99e4583eb2e45cf8b3bed5c01e586ee267
1956
1945
2006-07-18T16:24:35Z
EXt
1
/* Linux */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
* [[Using xargs]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
255747a255d7d441bad289fcfac46fd377931782
1945
1934
2006-07-15T10:30:30Z
EXt
1
/* Linux */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
* [[Thunderbird: Change account order]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
207785f6c5db1df684dce7896d89ce574a5acf34
1934
1927
2006-07-14T13:14:02Z
EXt
1
/* Linux */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
* [[GRUB: Boot another OS once]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
e9fb75eb908baf7f6212750ab39d733e8abc87bf
1927
1924
2006-05-28T17:36:27Z
EXt
1
/* Projects */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://www.studentmat.org Studentmat.org]
== [[Ideabox]] ==
f69bba20d5fcf903ca36cd223107d753ccab59d1
1924
1923
2006-05-23T13:25:00Z
EXt
1
/* Projects */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://studentmat.org Studentmat.org]
== [[Ideabox]] ==
38837a79df61db41b6d71eb2ad8bc5803a0c347a
1923
1921
2006-05-23T13:21:45Z
EXt
1
/* Projects */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
* [http://studentmat.org|Studentmat.org]
== [[Ideabox]] ==
de9a4ef0bbae4547714a1b946a47d4431244946d
1921
1918
2006-05-22T21:05:26Z
EXt
1
/* Projects */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
* [[Projektarbete]]
== [[Ideabox]] ==
afe7a0b6840ca7d8596507184c26bd24674cc498
1918
1914
2006-05-18T08:13:03Z
EXt
1
/* Articles */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing appearance of a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
== [[Ideabox]] ==
3c19acdf29ca996be0f2113b8d5bc347bfb5a377
1914
1912
2006-05-17T11:02:12Z
EXt
1
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing skin on a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
== [[Ideabox]] ==
2216cf5fb8fa48d1ddc9d8ee1e833e250f0be34e
1912
1905
2006-05-16T07:35:21Z
EXt
1
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
=== CEGUI ===
* [[Changing skin on a button]]
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
3709c05d66c95668a9f52fc5bed9bf7376f650fc
1905
1898
2006-05-11T14:31:15Z
EXt
1
/* Projects */
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
* [[Utility-lib]]
18e1f0ffc6c2649e84d723174d8e796497c7f686
1898
1897
2006-05-08T09:25:27Z
EXt
1
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game | Robot]] (the game)
d92d0de1a3c3007d8ec008f88729ce2d801bb4bf
1897
1895
2006-05-08T09:11:44Z
EXt
1
wikitext
text/x-wiki
<nowiki><insert description here></nowiki>
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
* [[Robot-game Robot]] (the game)
9b1bfae9052c744f6da6983efd39a5b09b34dbfe
1895
1372
2006-05-08T09:05:17Z
EXt
1
[[Huvudsida]] moved to [[Main Page]]: Changed language
wikitext
text/x-wiki
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
c6bc096e3944ffd9b4de286d5c97c35ce2474e21
1372
1371
2006-05-06T10:37:17Z
EXt
1
wikitext
text/x-wiki
== Articles ==
=== General programming ===
* [[Beginning C programming]]
* [[Code snippets]]
=== Game programming ===
* [[Game Engine Design]]
* [[Saving and loading in your game]]
=== Linux ===
* [[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
* [[Load BMP data (for heightmaps etc)]]
* [[Skybox tutorial]]
=== ODE ===
== Projects ==
* [[PNAB]]
* [[Game Engine]]
* [[LCD-Display Linux kernel module]]
c6bc096e3944ffd9b4de286d5c97c35ce2474e21
1371
1370
2006-05-06T10:36:42Z
EXt
1
wikitext
text/x-wiki
== Articles ==
=== General programming ===
[[Beginning C programming]]
[[Code snippets]]
=== Game programming ===
[[Game Engine Design]]
[[Saving and loading in your game]]
=== Linux ===
[[HOWTO Restore GRUB after Windows XP installation-cd]]
=== OpenGL ===
[[Load BMP data (for heightmaps etc)]]
[[Skybox tutorial]]
=== ODE ===
== Projects ==
[[PNAB]]
[[Game Engine]]
[[LCD-Display Linux kernel module]]
5d82736eb721bec56abb83d7f12a88f82b42f2f9
1370
1369
2006-05-06T10:27:41Z
EXt
1
wikitext
text/x-wiki
== Artiklar ==
=== Linux ===
=== OpenGL ===
=== ODE ===
63a5534a6584dd2f41bc21dd81c55435b9daf746
1369
1368
2006-05-06T10:26:40Z
EXt
1
wikitext
text/x-wiki
== Artiklar ==
=== Linux ===
=== OpenGL ===
d0f99b161106e09103ba19aece522cf2180cefde
1368
1367
2006-05-06T10:25:29Z
EXt
1
wikitext
text/x-wiki
== Artiklar ==
=== Linux ===
5146bc9e017f935310350ae28888c2e98ea7c07a
1367
1366
2006-05-06T10:23:54Z
EXt
1
wikitext
text/x-wiki
== Artiklar ==
81e6d786c7f2b55a2e325d52d5cee32d022b79ae
1366
1365
2006-05-06T10:14:39Z
EXt
1
wikitext
text/x-wiki
== Getting started ==
* [http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration settings list]
* [http://www.mediawiki.org/wiki/Help:FAQ MediaWiki FAQ]
* [http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
cfe62def08b99bbdbe5cdae9991957c9d7fa4bcf
1365
1
2006-05-06T10:13:57Z
EXt
1
wikitext
text/x-wiki
== Sidvind.com ==
== Getting started ==
* [http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration settings list]
* [http://www.mediawiki.org/wiki/Help:FAQ MediaWiki FAQ]
* [http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
42db71b29797e4f4a67b27386768cf09b9c47120
1
2006-05-06T09:57:12Z
MediaWiki default
0
wikitext
text/x-wiki
<big>'''MediaWiki has been successfully installed.'''</big>
Consult the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] for information on using the wiki software.
== Getting started ==
* [http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration settings list]
* [http://www.mediawiki.org/wiki/Help:FAQ MediaWiki FAQ]
* [http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
cfe9e457290978db5c59f7ed0e6495177716a20e
Mount
0
1592
2676
2675
2012-03-22T10:15:18Z
EXt
1
don't need toc
wikitext
text/x-wiki
__NOTOC__
= Mount tmpfs =
Creates a temporary ramdisk which content will be removed when unmounted. Fast reading and writing.
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
= Mount bind =
Bind mounting makes SRC available as both SRC and DST. Files will be accesable from both SRC and DST.
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
= Mount move =
Used to move a mountpoint from SRC to DST. Files will only be accesable from DST.
{{box code||
<nowiki>mount --move SRC DST</nowiki>
}}
= Mount loopback =
Loopback can be used to mount images (both harddisk images and cd iso)
{{box code||
<nowiki>mount -o loop SRC DST</nowiki>
}}
{{box code|Create empty disk image|
<nowiki>dd if=/dev/zero of=DST bs=4096 count=10000</nowiki>
<nowiki>mke2fs DST</nowiki>
}}
[[Category:Linux]]
[[Category:Mount]]
0510f7a0e042686f5fae2b0dd49a896430c04b8c
2675
2674
2012-03-22T10:14:30Z
EXt
1
wikitext
text/x-wiki
= Mount tmpfs =
Creates a temporary ramdisk which content will be removed when unmounted. Fast reading and writing.
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
= Mount bind =
Bind mounting makes SRC available as both SRC and DST. Files will be accesable from both SRC and DST.
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
= Mount move =
Used to move a mountpoint from SRC to DST. Files will only be accesable from DST.
{{box code||
<nowiki>mount --move SRC DST</nowiki>
}}
= Mount loopback =
Loopback can be used to mount images (both harddisk images and cd iso)
{{box code||
<nowiki>mount -o loop SRC DST</nowiki>
}}
{{box code|Create empty disk image|
<nowiki>dd if=/dev/zero of=DST bs=4096 count=10000</nowiki>
<nowiki>mke2fs DST</nowiki>
}}
[[Category:Linux]]
[[Category:Mount]]
66f1a5aa992c21eff47dbc5f2aa980f1dcc84638
2674
2012-03-22T10:10:03Z
EXt
1
Move content
wikitext
text/x-wiki
= Mount tmpfs =
Creates a temporary ramdisk which content will be removed when unmounted. Fast reading and writing.
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
= Mount bind =
Bind mounting makes SRC available as both SRC and DST.
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
[[Category:Linux]]
[[Category:Mount]]
ddabfa4c0d6b8f8dbe6751b9bfc99ba319df6306
Mount bind
0
1563
2678
2632
2012-03-22T10:16:22Z
EXt
1
redirect to new page
wikitext
text/x-wiki
#REDIRECT [[Mount#Mount_bind]]
c0bc7a87cde64787e923537c9bee08b153b7af52
2632
2600
2012-01-27T13:04:45Z
EXt
1
wikitext
text/x-wiki
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
[[Category:Linux]]
[[Category:Mount]]
f7892424cf9f8a39efc139a3651cbd7160f1c5cb
2600
2558
2012-01-27T12:45:47Z
EXt
1
wikitext
text/x-wiki
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
[[Category:Linux]]
bdf747772f84db9ffe04f9dc891e06fcf640c924
2558
2011-12-14T15:23:01Z
EXt
1
Created page with "{{box code|cli| <nowiki>mount --bind SRC DST</nowiki> }} {{box code|fstab| <nowiki>SRC DST none bind 0 0</nowiki> }}"
wikitext
text/x-wiki
{{box code|cli|
<nowiki>mount --bind SRC DST</nowiki>
}}
{{box code|fstab|
<nowiki>SRC DST none bind 0 0</nowiki>
}}
2e37b0764f82533735a752d18b47bb8cbb75501d
Mount tmpfs
0
1481
2677
2633
2012-03-22T10:16:05Z
EXt
1
redirect to new page
wikitext
text/x-wiki
#REDIRECT [[Mount#Mount_tmpfs]]
9fafd79c604708fe396e148c7e8f1d6bf4fc74f5
2633
2622
2012-01-27T13:04:56Z
EXt
1
wikitext
text/x-wiki
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
[[Category:Linux]]
[[Category:Mount]]
9b23ef0b247c541a6c1f9653fb788abbd1e8bfc3
2622
2601
2012-01-27T13:01:00Z
EXt
1
moved [[Tmpfs]] to [[Mount tmpfs]]
wikitext
text/x-wiki
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
[[Category:Linux]]
0613e2e0fb340ce50a7b7a579d4471d283e82131
2601
2307
2012-01-27T12:46:00Z
EXt
1
wikitext
text/x-wiki
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
[[Category:Linux]]
0613e2e0fb340ce50a7b7a579d4471d283e82131
2307
2306
2009-01-19T19:57:26Z
EXt
1
wikitext
text/x-wiki
{{box code|Mounting a 1GB ramdisk using tmpfs|
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
f24abb04eaa346ad7abb4ed120c93dbbcc006451
2306
2269
2009-01-19T19:57:14Z
EXt
1
wikitext
text/x-wiki
{{box code||Mounting a 1GB ramdisk using tmpfs
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
7b77a570ad8ad8c082030f5172230dae29edb8d1
2269
2008-07-13T21:27:32Z
EXt
1
New page: {{box code|| <nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki> }}
wikitext
text/x-wiki
{{box code||
<nowiki>mount -t tmpfs tmpfs /mnt/tmp -o size=1g</nowiki>
}}
22404fc96f34ac83fe5d8fe4714094c64f86160b
Netboot/OpenBSD
0
1593
2680
2012-03-26T22:17:58Z
EXt
1
Created page with "{{Template:Netboot}} OpenBSD includes pxeboot-file which can be used. Get the files {{Filename|bsd.rd}} and {{Filename|pxeboot}}, rename {{Filename|bsd.rd}} to {{Filename|bsd}} ..."
wikitext
text/x-wiki
{{Template:Netboot}}
OpenBSD includes pxeboot-file which can be used. Get the files {{Filename|bsd.rd}} and {{Filename|pxeboot}}, rename {{Filename|bsd.rd}} to {{Filename|bsd}} (requirement by pxeboot) and {{Filename|pxeboot}} to someting more descriptive.
= pxelinux.cfg =
LABEL openbsd-5.0 amd64 install
kernel pxechain.com
append IP::openbsd.pxe
Note that the IP of the server must be included.
03c47518dfe675587834e9de9a45a44c645dcc36
Netboot/Server
0
1582
2641
2012-01-28T00:30:37Z
EXt
1
Created page with "{{Template:Netboot}} The first steps to have netbooting is making your DHCP server provide the additional options (where the TFTP server is located and what filename to use), ha..."
wikitext
text/x-wiki
{{Template:Netboot}}
The first steps to have netbooting is making your DHCP server provide the additional options (where the TFTP server is located and what filename to use), having your TFTP server serve all the necessary files and configure pxelinux.
= DHCP/TFTP =
(using ISC DHCP server, but getting dnsmasq serving pxe is very similar; consult the documentation)
<codebox filename="dhcpd.conf" lang="text" highlight="7">
subnet 10.1.2.0 netmask 255.255.255.0 {
range 10.1.2.50 10.1.2.200;
option domain-name-servers ns.example.net;
option routers gw.example.net;
server-name "name.example.net";
filename "pxelinux.0";
}
</codebox>
"filename" is the name of the file the clients will download from the TFTP server, {{Filename|pxelinux.0}} is the default name from syslinux so you might as well keep it. If the TFTP server does not reside on the same machine as DHCP you can use '''<tt>next-server other.example.net;</tt>''' to point it somewhere else.
Next configure a TFTP server of your choice and have it serve a directory, e.g. {{Filename|/var/tftproot}}.
It is possible to serve different files to different clients, e.g:
class "auto-00:40:63" {
match if substring( hardware, 1, 3) = 00:40:63;
filename "other";
}
= Syslinux =
Install syslinux and copy {{Filename|pxelinux.0}} and {{Filename|vesamenu.c32}} to you TFTP root. Create a directory called {{Filename|pxelinux.cfg}} and the file {{Filename|pxelinux.cfg/default}}, that will be where you put the configuration for your pxe environment. vesamenu is used to provide a prettier graphical interface but if thats not what you want you may ignore it (and remove the relevant lines from the config)
<codebox filename="pxelinux.cfg/default" lang="text">
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 50
MENU TITLE Sample netboot
LABEL localboot
localboot 0
</codebox>
This sample will create a pxe netboot which displays the menu with a single entry "localboot" and a 5 second timeout (entered as tenth of seconds). For a full description of the options see the syslinux(1) manpage.
== Entries ==
<codebox lang="text">
LABEL name
MENU LABEL Title
TEXT HELP
Some additional text
ENDTEXT
localboot 0
</codebox>
* LABEL marks the start of an entry.
* MENU LABEL is used to give a different (often more verbose) description of the entry (shown when using vesamenu.c32).
* TEXT HELP is shown to the user when selecting an entry.
* localboot will continue to boot the system as usual, ignoring pxe.
0d718f2b27128584ed602eb6e18de907be0fa006
Netboot/Ubuntu
0
1564
2579
2574
2012-01-08T01:17:25Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This shows how to setup serving of multiple ubuntu images over pxelinux netboot.
= Prerequisites =
* DHCP server (assuming dhcpd, but steps should be similar for other servers)
* NFS server
* TFTP server
= Image creation =
Put the created folder in the TFTP root
<ol>
<li>Grab DVD image from [http://www.ubuntu.com/download/ubuntu/alternative-download#dvd]</li>
<li>Grab netboot files. Ensure you get the same version as the DVD image.</li>
wget -nc -R "index.*" -R '*.gif' -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/
<li>Merge files into a single directory (in TFTP root).</li>
cp -R archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386
cp archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
<li>Fix include paths.</li>
find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
<li>Mount DVD iso and copy content to NFS share ('''Don't forget the .disk directory''')</li>
mount -o loop ubuntu-11.10-dvd-i386.iso temp
mkdir /export/ubuntu-11.10-i386
cp -r temp/* temp/.disk /export/ubuntu-11.10-i386/
<li>Export nfs share</li>
emacs /etc/exports
/export/ubuntu-11.10-i386 1.2.3.4/255.255.255.0(async,no_root_squash,no_subtree_check,ro)
/etc/init.d/nfs reload
<li>Copy casper to netboot dir</li>
cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386
</ol>
= Configure pxelinux =
# Install syslinux
# Copy pxelinux.0, pxelinux.cfg and vesamenu.c32 to TFTP root
# Edit pxelinux.cfg/default
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 50
MENU TITLE netboot
LABEL ubuntu-11.10 i386 live
kernel ubuntu-11.10-i386/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=1.2.3.4:/export/ubuntu-11.10-i386 initrd=ubuntu-11.10-i386/casper/initrd.lz quiet splash --
LABEL ubuntu-11.10 i386 install
kernel ubuntu-11.10-i386/boot-screens/vesamenu.c32
append ubuntu-11.10-i386/boot-screens/menu.cfg
The first entry runs the live DVD of NFS while the second launches a small netinstall.
= DHCP =
Simply set:
filename "pxelinux.0";
If you run the TFTP server on another host use "next-server".
44fe3886b706379c35f7b92b96e7a35923183a63
2574
2561
2012-01-08T00:55:19Z
EXt
1
moved [[Netboot Ubuntu]] to [[Netboot/Ubuntu]]: Share namespace
wikitext
text/x-wiki
This shows how to setup serving of multiple ubuntu images over pxelinux netboot.
= Prerequisites =
* DHCP server (assuming dhcpd, but steps should be similar for other servers)
* NFS server
* TFTP server
= Image creation =
Put the created folder in the TFTP root
<ol>
<li>Grab DVD image from [http://www.ubuntu.com/download/ubuntu/alternative-download#dvd]</li>
<li>Grab netboot files. Ensure you get the same version as the DVD image.</li>
wget -nc -R "index.*" -R '*.gif' -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/
<li>Merge files into a single directory (in TFTP root).</li>
cp -R archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386
cp archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
<li>Fix include paths.</li>
find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
<li>Mount DVD iso and copy content to NFS share ('''Don't forget the .disk directory''')</li>
mount -o loop ubuntu-11.10-dvd-i386.iso temp
mkdir /export/ubuntu-11.10-i386
cp -r temp/* temp/.disk /export/ubuntu-11.10-i386/
<li>Export nfs share</li>
emacs /etc/exports
/export/ubuntu-11.10-i386 1.2.3.4/255.255.255.0(async,no_root_squash,no_subtree_check,ro)
/etc/init.d/nfs reload
<li>Copy casper to netboot dir</li>
cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386
</ol>
= Configure pxelinux =
# Install syslinux
# Copy pxelinux.0, pxelinux.cfg and vesamenu.c32 to TFTP root
# Edit pxelinux.cfg/default
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 50
MENU TITLE netboot
LABEL ubuntu-11.10 i386 live
kernel ubuntu-11.10-i386/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=1.2.3.4:/export/ubuntu-11.10-i386 initrd=ubuntu-11.10-i386/casper/initrd.lz quiet splash --
LABEL ubuntu-11.10 i386 install
kernel ubuntu-11.10-i386/boot-screens/vesamenu.c32
append ubuntu-11.10-i386/boot-screens/menu.cfg
The first entry runs the live DVD of NFS while the second launches a small netinstall.
= DHCP =
Simply set:
filename "pxelinux.0";
If you run the TFTP server on another host use "next-server".
eaeddc62ebed435df72fe6fab5bee705350e3940
2561
2560
2012-01-04T02:12:10Z
EXt
1
wikitext
text/x-wiki
This shows how to setup serving of multiple ubuntu images over pxelinux netboot.
= Prerequisites =
* DHCP server (assuming dhcpd, but steps should be similar for other servers)
* NFS server
* TFTP server
= Image creation =
Put the created folder in the TFTP root
<ol>
<li>Grab DVD image from [http://www.ubuntu.com/download/ubuntu/alternative-download#dvd]</li>
<li>Grab netboot files. Ensure you get the same version as the DVD image.</li>
wget -nc -R "index.*" -R '*.gif' -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/
<li>Merge files into a single directory (in TFTP root).</li>
cp -R archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386
cp archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
<li>Fix include paths.</li>
find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
<li>Mount DVD iso and copy content to NFS share ('''Don't forget the .disk directory''')</li>
mount -o loop ubuntu-11.10-dvd-i386.iso temp
mkdir /export/ubuntu-11.10-i386
cp -r temp/* temp/.disk /export/ubuntu-11.10-i386/
<li>Export nfs share</li>
emacs /etc/exports
/export/ubuntu-11.10-i386 1.2.3.4/255.255.255.0(async,no_root_squash,no_subtree_check,ro)
/etc/init.d/nfs reload
<li>Copy casper to netboot dir</li>
cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386
</ol>
= Configure pxelinux =
# Install syslinux
# Copy pxelinux.0, pxelinux.cfg and vesamenu.c32 to TFTP root
# Edit pxelinux.cfg/default
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 50
MENU TITLE netboot
LABEL ubuntu-11.10 i386 live
kernel ubuntu-11.10-i386/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=1.2.3.4:/export/ubuntu-11.10-i386 initrd=ubuntu-11.10-i386/casper/initrd.lz quiet splash --
LABEL ubuntu-11.10 i386 install
kernel ubuntu-11.10-i386/boot-screens/vesamenu.c32
append ubuntu-11.10-i386/boot-screens/menu.cfg
The first entry runs the live DVD of NFS while the second launches a small netinstall.
= DHCP =
Simply set:
filename "pxelinux.0";
If you run the TFTP server on another host use "next-server".
eaeddc62ebed435df72fe6fab5bee705350e3940
2560
2012-01-04T02:05:17Z
EXt
1
Created page with "This shows how to setup serving of multiple ubuntu images over pxelinux netboot. = Prerequisites = * DHCP server (assuming dhcpd, but steps should be similar for other servers)..."
wikitext
text/x-wiki
This shows how to setup serving of multiple ubuntu images over pxelinux netboot.
= Prerequisites =
* DHCP server (assuming dhcpd, but steps should be similar for other servers)
* NFS server
* TFTP server
= Image creation =
<ol>
<li>Grab DVD image from [http://www.ubuntu.com/download/ubuntu/alternative-download#dvd]</li>
<li>Grab netboot files. Ensure you get the same version as the DVD image.</li>
wget -nc -R "index.*" -R '*.gif' -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/
<li>Merge files into a single directory.</li>
cp -R archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386
cp archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
<li>Fix include paths.</li>
find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
<li>Mount DVD iso and copy content to NFS share ('''Don't forget the .disk directory''')</li>
mount -o loop ubuntu-11.10-dvd-i386.iso temp
mkdir /export/ubuntu-11.10-i386
cp -r temp/* temp/.disk /export/ubuntu-11.10-i386/
<li>Export nfs share</li>
emacs /etc/exports
/export/ubuntu-11.10-i386 1.2.3.4/255.255.255.0(async,no_root_squash,no_subtree_check,ro)
/etc/init.d/nfs reload
<li>Copy casper to netboot dir</li>
cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386
<li>Edit pxelinux.cfg/default</li>
LABEL ubuntu-11.10 i386 live
kernel ubuntu-11.10-i386/casper/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=1.2.3.4:/export/ubuntu-11.10-i386 initrd=ubuntu-11.10-i386/casper/initrd.lz quiet splash --
LABEL ubuntu-11.10 i386 install
kernel ubuntu-11.10-i386/boot-screens/vesamenu.c32
append ubuntu-11.10-i386/boot-screens/menu.cfg
</ol>
172eeb55b113cd4e70cad1062b080f099cb15ff5
Netboot/Windows 7
0
1565
2585
2584
2012-01-08T16:59:57Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This guide shows how to netboot a Windows 7 installation using [http://technet.microsoft.com/en-us/library/cc766093%28WS.10%29.aspx Windows PE] and allow serving both x86 and x64 images at the same time. It assumes you already have [[Netboot/Server|pxelinux]] running.
The process is divided into four parts:
* Creating the Windows PE image which is loaded by the bootloader.
* Creating the bootloader image which will be a single iso usable by the memdisk kernel (from syslinux) instead of bloating the TFTP server with fixed filenames.
* Setup samba share serving installation media.
* Configure syslinux.
Instructions loosely based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Windows 7 Installation media (as ISO)
* Samba
= Windows PE image =
From an existing windows installation. Replace x86 with amd64 (x64, including intel) or ia64 (for intel Itanium only, if you have a core2 duo or similar use amd64)
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path (If you don't want to autostart the setup or otherwise customize the environment you can skip to the last step.)
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). Unlike optical media and usb, Windows PE will not attempt and unattended installation unless otherwise specified using the /unattended flag (e.g /unattend:z:\Autounattend.xml).
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
If you need any special files included in the booted environment copy them before unmounting the image, but it might be easier to access files using samba later.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= Samba =
Setup a public readable samba share containing the real installation image, e.g. mounted as loopback. Replace names, interfaces and subnets as you see fit.
<codebox filename="smb.conf" lang="ini">
[global]
workgroup = WORKGROUP
server string = SERVER
interfaces = eth1
bind interfaces only = Yes
map to guest = Bad User
hosts allow = 10.0.44., 127.
[export]
path = /export
guest ok = Yes
</codebox>
Assuming you don't change the username (see docs) the anon user will be "nobody", so setup a empty password using:
smbpasswd -an nobody
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
Might have to append "raw".
c178f6c86f2a56155822a4f19fed77e4b6e9e56e
2584
2583
2012-01-08T01:56:53Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This guide shows how to netboot a Windows 7 installation using [http://technet.microsoft.com/en-us/library/cc766093%28WS.10%29.aspx Windows PE] and allow serving both x86 and x64 images at the same time. It assumes you already have [[Netboot/Server|pxelinux]] running.
The process is divided into four parts:
* Creating the Windows PE image which is loaded by the bootloader.
* Creating the bootloader image which will be a single iso usable by the memdisk kernel (from syslinux) instead of bloating the TFTP server with fixed filenames.
* Setup samba share serving installation media.
* Configure syslinux.
Instructions loosely based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Windows 7 Installation media (as ISO)
* Samba
= Windows PE image =
From an existing windows installation. Replace x86 with amd64 (x64, including intel) or ia64 (for intel Itanium only, if you have a core2 duo or similar use amd64)
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path (If you don't want to autostart the setup or otherwise customize the environment you can skip to the last step.)
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). Unlike optical media and usb, Windows PE will not attempt and unattended installation unless otherwise specified using the /unattended flag (e.g /unattend:z:\Autounattend.xml).
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
If you need any special files included in the booted environment copy them before unmounting the image, but it might be easier to access files using samba later.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= Samba =
Setup a public readable samba share containing the real installation image, e.g. mounted as loopback. Replace names, interfaces and subnets as you see fit.
<codebox filename="smb.conf" lang="ini">
[global]
workgroup = WORKGROUP
server string = SERVER
interfaces = eth1
bind interfaces only = Yes
map to guest = Bad User
hosts allow = 10.0.44., 127.
[export]
path = /export
guest ok = Yes
</codebox>
Assuming you don't change the username (see docs) the anon user will be "nobody", so setup a empty password using:
smbpasswd -an nobody
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
131683f55631ab2530979df2538d51bd71a30e3b
2583
2582
2012-01-08T01:46:39Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This guide shows how to netboot a Windows 7 installation using [http://technet.microsoft.com/en-us/library/cc766093%28WS.10%29.aspx Windows PE] and allow serving both x86 and x64 images at the same time. It assumes you already have [[Netboot/Server|pxelinux]] running.
Instructions loosely based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Windows 7 Installation media (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other environments, or the TFTP server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). If you're not using unattended install remove that portion and just call setup. You can also use an xml-file from samba share using \\server\path. Unlike optical media and usb, windows PE will not attempt unattended installation unless otherwise specified using /unattended.
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= Samba =
Setup a public readable samba share containing the real installation image, e.g. mounted as loopback. Replace names, interfaces and subnets as you see fit.
<codebox filename="smb.conf" lang="ini">
[global]
workgroup = WORKGROUP
server string = SERVER
interfaces = eth1
bind interfaces only = Yes
map to guest = Bad User
hosts allow = 10.0.44., 127.
[export]
path = /export
guest ok = Yes
</codebox>
Assuming you don't change the username (see docs) the anon user will be "nobody", so setup a empty password using:
smbpasswd -an nobody
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
342eae3080ace1595157a975fb7a2c563166ad44
2582
2581
2012-01-08T01:37:21Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Windows 7 Installation media (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). If you're not using unattended install remove that portion and just call setup. You can also use an xml-file from samba share using \\server\path. Unlike optical media and usb, windows PE will not attempt unattended installation unless otherwise specified using /unattended.
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= Samba =
Setup a public readable samba share containing the real installation image, e.g. mounted as loopback. Replace names, interfaces and subnets as you see fit.
<codebox filename="smb.conf" lang="ini">
[global]
workgroup = WORKGROUP
server string = SERVER
interfaces = eth1
bind interfaces only = Yes
map to guest = Bad User
hosts allow = 10.0.44., 127.
[export]
path = /export
guest ok = Yes
</codebox>
Assuming you dont change the username (see docs) the anon user will be "nobody", so setup a empty password using:
smbpasswd -an nobody
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
c0b212bee339d0bf8b471e96a88e6bab97b80ccc
2581
2580
2012-01-08T01:34:58Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Windows 7 Installation media (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). If you're not using unattended install remove that portion and just call setup. You can also use an xml-file from samba share using \\server\path.
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= Samba =
Setup a public readable samba share containing the real installation image, e.g. mounted as loopback. Replace names, interfaces and subnets as you see fit.
<codebox filename="smb.conf" lang="ini">
[global]
workgroup = WORKGROUP
server string = SERVER
interfaces = eth1
bind interfaces only = Yes
map to guest = Bad User
hosts allow = 10.0.44., 127.
[export]
path = /export
guest ok = Yes
</codebox>
Assuming you dont change the username (see docs) the anon user will be "nobody", so setup a empty password using:
smbpasswd -an nobody
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
e90b25dae81a37d437e88b9b745ed08b3484d669
2580
2578
2012-01-08T01:24:59Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file). If you're not using unattended install remove that portion and just call setup. You can also use an xml-file from samba share using \\server\path.
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST (upload this to the tftp root)
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
= pxelinux.cfg =
LABEL Windows PE
kernel memdisk
initrd winpe.img
cf482c2ff7ee378eb047533c07db7f91aa07a375
2578
2571
2012-01-08T01:17:14Z
EXt
1
wikitext
text/x-wiki
{{Template:Netboot}}
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file)
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
c2fe1df53083ef89acbdb2e591cf823832d2ef48
2571
2570
2012-01-08T00:54:29Z
EXt
1
moved [[Netboot\Windows 7]] to [[Netboot/Windows 7]]: Because I'm stupid (and has been typing in cmd.exe for too long)
wikitext
text/x-wiki
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file)
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
1e3af6fe86f84fb5d8514a6c722e311b0a37d402
2570
2569
2012-01-08T00:52:26Z
EXt
1
wikitext
text/x-wiki
This shows how to netboot windows 7 installation and allow serving both x86 and x64 images at the same time.
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Samba
= Overview =
# Create Windows PE image (which you will netboot)
# Create bootloader image (so it can coexist with other enviroments, or the tftp server will be bloated with files with fixed names)
# Setup samba share serving installation media.
# Configure syslinux.
= Windows PE image =
From an existing windows installation.
# Install Windows AIK and run deployment console
# copype.cmd x86 C:\Path
# cd Path
# mkdir mount
# imagex /mountrw winpe.wim 1 mount
# edit mount\Windows\System32\startnet.cmd (see below, remember to be admin or you cannot save file)
# imagex /unmount /commit mount
# Upload winpe.wim to where you want to create boot image.
<codebox filename="startnet.cmd" lang="dos">
wpeinit
@net use z: \\SERVER\PATH
@SET PATH=%PATH%;"z:\"
@echo Installation media mounted on z:
@setup /unattend:z:\Autounattend.xml
</codebox>
= Bootloader image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
1e3af6fe86f84fb5d8514a6c722e311b0a37d402
2569
2568
2012-01-08T00:32:28Z
EXt
1
wikitext
text/x-wiki
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
* Samba
= winpe.wim =
= Boot image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
a6974fabdef34fb140169f737737304a29fa7f56
2568
2567
2012-01-08T00:31:42Z
EXt
1
wikitext
text/x-wiki
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Requirements =
* Windows AIK
* Windows 7 Repair CD (as ISO)
= Boot image =
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
9500387dadfb41631a3888d2c1849827e8f5f6d0
2567
2564
2012-01-08T00:28:16Z
EXt
1
wikitext
text/x-wiki
Instructions based on [http://etherboot.org/wiki/winpe_memdisk].
= Boot image =
# Create a windows repair disc (as ISO)
# mkdir winpe_boot temp
# mount -o loop win7_repair.iso temp
# rsync -avP temp/* winpe_boot
# perl [http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/ geteltorito.pl] win7_repair.iso > winpe_boot/boot.bin
# cp winpe.win bootstrap.bat bootstrap.diskpart winpe_boot
# cd winpe_boot
# mkisofs -udf -v -b boot.bin -no-emul-boot -o ../WinPE_bootstrap.iso .
# Create virtual machine which at 160MB disk (if your winpe.wim image is large you might need more) and boot using the iso you created.
# Enter command prompt and execute bootstrap script (available on disc, e.g. D:), watch output for any failures.
# Reboot to a linux live cd
# dd if=/dev/hda of=winpe.img
# scp winpe.img SERVER:DST
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
5570ed768444d8b836ae30eecbe8705b96ca0b67
2564
2563
2012-01-08T00:13:15Z
EXt
1
moved [[Netboot\Windows]] to [[Netboot\Windows 7]]
wikitext
text/x-wiki
= Boot image =
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
a6fa9a0db3448bad3921e64d02ffbdcddcdcf19c
2563
2012-01-08T00:11:21Z
EXt
1
Created page with "= Boot image = <codebox filename="bootstrap.bat" lang="dos"> @echo This will erase and overwrite disk 0 with WinPE bootloader. @echo Abort now if this isn't what you intend to d..."
wikitext
text/x-wiki
= Boot image =
<codebox filename="bootstrap.bat" lang="dos">
@echo This will erase and overwrite disk 0 with WinPE bootloader.
@echo Abort now if this isn't what you intend to do.
@pause
diskpart /s bootstrap.diskpart
c:
mkdir boot
copy d:\bootmgr c:\
copy d:\boot\boot.sdi c:\
copy d:\winpe.wim c:\
attrib +s +h +r c:\bootmgr
bcdedit -createstore c:\boot\BCD
bcdedit -import c:\boot\BCD
bcdedit -create {bootmgr} /d "Boot Manager"
for /f "tokens=3" %%a in ('bcdedit -create -application osloader /d "WinPE"') do set GUID=%%a
bcdedit -create {ramdiskoptions} /d "Ramdisk Options"
bcdedit -set {bootmgr} device partition=C:
bcdedit -set {bootmgr} default %GUID%
bcdedit -set {default} device ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} osdevice ramdisk=[C:]\winpe.wim,{ramdiskoptions}
bcdedit -set {default} path \windows\system32\boot\winload.exe
bcdedit -set {default} systemroot \windows
bcdedit -set {default} detecthal yes
bcdedit -set {default} winpe yes
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \boot.sdi
</codebox>
<codebox filename="bootstrap.diskpart" lang="dos">
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
active
assign letter=c
</codebox>
a6fa9a0db3448bad3921e64d02ffbdcddcdcf19c
Netboot\Windows
0
1566
2565
2012-01-08T00:13:15Z
EXt
1
moved [[Netboot\Windows]] to [[Netboot\Windows 7]]
wikitext
text/x-wiki
#REDIRECT [[Netboot\Windows 7]]
3224e29899e0b61b2d05885dc97e0c75d00917db
Netboot\Windows 7
0
1567
2572
2012-01-08T00:54:29Z
EXt
1
moved [[Netboot\Windows 7]] to [[Netboot/Windows 7]]: Because I'm stupid (and has been typing in cmd.exe for too long)
wikitext
text/x-wiki
#REDIRECT [[Netboot/Windows 7]]
77afd96854bff21495d7933a0948f5785cb51354
Netboot Ubuntu
0
1568
2575
2012-01-08T00:55:19Z
EXt
1
moved [[Netboot Ubuntu]] to [[Netboot/Ubuntu]]: Share namespace
wikitext
text/x-wiki
#REDIRECT [[Netboot/Ubuntu]]
c8369623c0cb973baebee6b062d2c1bd4cbdad36
NitroXy/NX10/Packlista
0
1486
2361
2360
2010-03-30T19:11:15Z
82.145.149.138
0
wikitext
text/x-wiki
Skriv ut och kryssa i.
== Utrustning ==
* [ ] Dator (RURI, byakuya, mizuki, nått åt aktivity)
* [ ] Skärm x 4
* [ ] Tillbehör dator x 4
* [ ] Switch x 2
* [ ] Mobil + laddare
== Personligt ==
== Medicin ==
* [ ] Alvedon
* [ ] Samarin
* [ ] Idomin
* [ ] Försvares hudsalva
== Tech/Media ==
* [ ] DV-kamera + kabel
* [ ] Vanlig kamera + kabel
* [ ] Buntband
* [ ] Skruvmejslar
* [ ] TP-tång
* [ ] Gentoo-skivor
* [ ] 10m skärmkabel
* [ ] CD-penna
* [ ] Gaffa
* [ ] Grendosor
* [ ] Förlängningskablar
== Övrigt ==
* [ ] 1kg mjöl, räksmörgås och ev en badring (åt midler)
== Hestra ==
* [ ] TP-kabel
* [ ] gammla vinster
* [ ] Mera t-shirt
* [ ] Blandade Kablar
* [ ] Fiber-kabel & kassalådor
125078e4b2a0c30e90f6d0deef4eb5dc390e1334
2360
2286
2010-03-30T18:29:51Z
EXt
1
wikitext
text/x-wiki
Skriv ut och kryssa i.
== Utrustning ==
* [ ] Dator (RURI, byakuya, mizuki, nått åt aktivity)
* [ ] Skärm x 4
* [ ] Tillbehör dator x 4
* [ ] Switch x 2
* [ ] Mobil + laddare
== Personligt ==
== Medicin ==
* [ ] Alvedon
* [ ] Samarin
* [ ] Idomin
* [ ] Försvares hudsalva
== Tech/Media ==
* [ ] DV-kamera + kabel
* [ ] Vanlig kamera + kabel
* [ ] Buntband
* [ ] Skruvmejslar
* [ ] TP-tång
* [ ] Gentoo-skivor
* [ ] 10m skärmkabel
* [ ] CD-penna
* [ ] Gaffa
* [ ] Grendosor
* [ ] Förlängningskablar
== Övrigt ==
* [ ] 1kg mjöl, räksmörgås och ev en badring (åt midler)
51a7c2b8a92b006352a3fccdd4338764c0909c43
2286
2008-10-28T19:12:17Z
EXt
1
New page: Skriv ut och kryssa i. * [ ] 1kg mjöl, räksmörgås och ev en badring (åt midler)
wikitext
text/x-wiki
Skriv ut och kryssa i.
* [ ] 1kg mjöl, räksmörgås och ev en badring (åt midler)
b1982ac612d5c1dda91154e6a227cbd1f1de013b
NitroXy/NX9/Packlista
0
1440
2187
2186
2008-03-19T09:49:19Z
83.209.20.148
0
wikitext
text/x-wiki
Skriv ut och kryssa i.
* [ ] DV-kamera + kabel
* [ ] Vanlig kamera + kabel
* [ ] Hatt
* [ ] "Ute"-kiol
* [ ] Nät-linne
* [ ] Linne
* [ ] Ljudgömmankjol
* [ ] Örhängen
* [ ] Rakhyvel
* [ ] Deo
* [ ] Symaskin
* [ ] Matberedare (låna av mamma?)
* [ ] Tuggummi
* [ ] Dator x 3
* [ ] Skärm x 2
* [ ] Tillbehör dator x 2
* [ ] Switch
* [ ] kamera + kabel
* [ ] Medicin (alvedon, samarin, mm)
* [ ] Handduk
* [ ] Mobil + laddare
* [ ] Buntband
* [ ] Skruvmejslar
* [ ] Gentoo-skivor
* [ ] Silicon-inlägg
* [ ] 10m skärmkabel
2c400f311e4202bc3dd0f5b5864177a0ec7d38da
2186
2185
2008-03-19T08:44:31Z
83.209.20.148
0
wikitext
text/x-wiki
Skriv ut och kryssa i.
* [ ] DV-kamera + kabel
* [ ] Vanlig kamera + kabel
* [ ] Hatt
* [ ] "Ute"-kiol
* [ ] Nät-linne
* [ ] Linne
* [ ] Ljudgömmankjol
* [ ] Örhängen
* [ ] Rakhyvel
* [ ] Deo
* [ ] Symaskin
* [ ] Matberedare (låna av mamma?)
* [ ] Tuggummi
* [ ] Dator x 3
* [ ] Skärm x 2
* [ ] Tillbehör dator x 2
* [ ] Switch
* [ ] kamera + kabel
* [ ] Medicin (alvedon, samarin, mm)
* [ ] Handduk
* [ ] Mobil + laddare
* [ ] Buntband
* [ ] Skruvmejslar
* [ ] Gentoo-skivor
* [ ] Silicon-inlägg
2ed7a7bdd4b2021d4c93c6f73c38ef8d67007ff0
2185
2008-03-18T22:30:58Z
83.209.20.150
0
New page: Skriv ut och kryssa i. * [ ] DV-kamera + kabel * [ ] Vanlig kamera + kabel * [ ] Hatt * [ ] "Ute"-kiol * [ ] Nät-linne * [ ] Linne * [ ] Ljudgömmankjol * [ ] Örhängen ...
wikitext
text/x-wiki
Skriv ut och kryssa i.
* [ ] DV-kamera + kabel
* [ ] Vanlig kamera + kabel
* [ ] Hatt
* [ ] "Ute"-kiol
* [ ] Nät-linne
* [ ] Linne
* [ ] Ljudgömmankjol
* [ ] Örhängen
* [ ] Rakhyvel
* [ ] Deo
* [ ] Symaskin
* [ ] Matberedare (låna av mamma?)
* [ ] Tuggummi
* [ ] Dator x 3
* [ ] Skärm x 2
* [ ] Tillbehör dator x 2
* [ ] Switch
* [ ] kamera + kabel
* [ ] Medicin (alvedon, samarin, mm)
* [ ] Handduk
* [ ] Mobil + laddare
* [ ] Buntband
* [ ] Skruvmejslar
* [ ] Gentoo-skivor
3aca039701ce6b3f2391191f205152c627059353
NitroXy/NX9/Tasklist
0
1441
2190
2189
2008-03-20T22:34:06Z
83.209.20.148
0
wikitext
text/x-wiki
== Att göra under uppbyggnaden ==
=== Slideshow ===
* iptables
* .htaccess
* fixa lösen
* nfs
* byta disk
* win32codesc
* autostart
5a3ee7ad00f0dfdbea217039aef349e814ef0fc4
2189
2188
2008-03-20T21:56:53Z
83.209.20.148
0
wikitext
text/x-wiki
== Att göra under uppbyggnaden ==
=== Slideshow ===
* iptables
* .htaccess
* fixa lösen
* nfs
* byta disk
* win32codesc
09cb5c8b44d443b0bfc6566227ea82b343a6944b
2188
2008-03-20T20:00:37Z
83.209.20.148
0
New page: == Att göra under uppbyggnaden == === Slideshow === * iptables * .htaccess * fixa lösen * nfs * byta disk
wikitext
text/x-wiki
== Att göra under uppbyggnaden ==
=== Slideshow ===
* iptables
* .htaccess
* fixa lösen
* nfs
* byta disk
e74157fcb40322a5f964c3055eb2fe23fdf4a724
Nitroxy/Mat NX9
0
1439
2177
2008-03-01T12:49:39Z
EXt
1
[[Nitroxy/Mat NX9]] moved to [[NitroXy/Mat NX9]]: Korrect namespace
wikitext
text/x-wiki
#REDIRECT [[NitroXy/Mat NX9]]
7f53683c5e57415c5ffdb8c5b79adad3aeba40af
Nvidia fanspeed adjustment
0
1406
2475
2288
2010-12-29T15:59:15Z
EXt
1
proper codebox
wikitext
text/x-wiki
This is a simple script thats can lower or raise the speed of the fan on nvidia based graphic cards. Requires nvclock.
=== Usage ===
* Lower speed by 10%: adjustspeed -10
* Raise speed by 5%: adjustspeed 5
* Set to stored speed: adjustspeed
<codebox filename="adjustspeed.sh">
#!/bin/bash
if [ ! -e ~/.fanspeed ];
then
echo "Creating ~/.fanspeed with default speed (100%)"
echo "100" > ~/.fanspeed
fi
speed=`cat ~/.fanspeed`
if [ ! $1 ];
then
echo "Setting speed to stored value ($speed%)"
nvclock -F $speed -f
exit 0
else
diff=$1
fi
speed=`expr $speed + $diff`
if [ $speed -lt 30 ];
then
speed=30
fi
if [ $speed -gt 100 ];
then
speed=100
fi
nvclock -F $speed -f
pkill osd_cat
echo "$speed" > ~/.fanspeed
echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2
</codebox>
5dbaf66b7b93d9cf2e1fb8afa3a597e6108c905c
2288
2013
2008-12-11T20:00:26Z
157.182.43.12
0
/* Usage */
wikitext
text/x-wiki
This is a simple script thats can lower or raise the speed of the fan on nvidia based graphic cards. Requires nvclock.
=== Usage ===
* Lower speed by 10%: adjustspeed -10
* Raise speed by 5%: adjustspeed 5
* Set to stored speed: adjustspeed
{{Box code|Script: adjustspeed|
<code>
#!/bin/bash
if [ ! -e ~/.fanspeed ];
then
echo "Creating ~/.fanspeed with default speed (100%)"
echo "100" > ~/.fanspeed
fi
speed=`cat ~/.fanspeed`
if [ ! $1 ];
then
echo "Setting speed to stored value ($speed%)"
nvclock -F $speed -f
exit 0
else
diff=$1
fi
speed=`expr $speed + $diff`
if [ $speed -lt 30 ];
then
speed=30
fi
if [ $speed -gt 100 ];
then
speed=100
fi
nvclock -F $speed -f
pkill osd_cat
echo "$speed" > ~/.fanspeed
echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2
</code>
}}
f792d3e5bbefa824510553cb2b9d4130489cb1ce
2013
2012
2006-08-20T13:23:00Z
EXt
1
wikitext
text/x-wiki
This is a simple script thats can lower or raise the speed of the fan on nvidia based graphic cards. Requires nvclock.
=== Usage ===
* Lower speed by 10%: adjustspeed -10
* Raise speed by 5%: adjustspeed 5
* Set to stored speed: adjustspeed
{{Box code|Script: adjustspeed|
<code>
#!/bin/bash
if [ ! -e ~/.fanspeed ];
then
echo "Creating ~/.fanspeed with default speed (100%)"
echo "100" > ~/.fanspeed
fi
<nowiki>speed=`cat ~/.fanspeed`</nowiki>
if [ ! $1 ];
then
echo "Setting speed to stored value ($speed%)"
nvclock -F $speed -f
exit 0
else
diff=$1
fi
speed=`expr $speed + $diff`
if [ $speed -lt 30 ];
then
speed=30
fi
if [ $speed -gt 100 ];
then
speed=100
fi
nvclock -F $speed -f
pkill osd_cat
echo "$speed" > ~/.fanspeed
echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2
</code>
}}
8cf698f5d70fef5c877f41acebc97c99e4b577af
2012
2011
2006-08-20T13:21:53Z
EXt
1
wikitext
text/x-wiki
This is a simple script thats can lower or raise the speed of the fan on nvidia based graphic cards.
=== Usage ===
* Lower speed by 10%: adjustspeed -10
* Raise speed by 5%: adjustspeed 5
* Set to stored speed: adjustspeed
{{Box code|Script: adjustspeed|
<code>
#!/bin/bash
if [ ! -e ~/.fanspeed ];
then
echo "Creating ~/.fanspeed with default speed (100%)"
echo "100" > ~/.fanspeed
fi
<nowiki>speed=`cat ~/.fanspeed`</nowiki>
if [ ! $1 ];
then
echo "Setting speed to stored value ($speed%)"
nvclock -F $speed -f
exit 0
else
diff=$1
fi
speed=`expr $speed + $diff`
if [ $speed -lt 30 ];
then
speed=30
fi
if [ $speed -gt 100 ];
then
speed=100
fi
nvclock -F $speed -f
pkill osd_cat
echo "$speed" > ~/.fanspeed
echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2
</code>
}}
c7c24ed9a12689212aa4505a86664865a3e84809
2011
2006-08-20T12:30:55Z
EXt
1
wikitext
text/x-wiki
{{Box code||
<code>
#!/bin/bash
if [ ! -e ~/.fanspeed ];
then
echo "Creating ~/.fanspeed with default speed (100%)"
echo "100" > ~/.fanspeed
fi
<nowiki>speed=`cat ~/.fanspeed`</nowiki>
if [ ! $1 ];
then
echo "Setting speed to stored value ($speed%)"
nvclock -F $speed -f
exit 0
else
diff=$1
fi
speed=`expr $speed + $diff`
if [ $speed -lt 30 ];
then
speed=30
fi
if [ $speed -gt 100 ];
then
speed=100
fi
nvclock -F $speed -f
pkill osd_cat
echo "$speed" > ~/.fanspeed
echo "Fanspeed: $speed%" | \osd_cat -f "-*-courier-bold-r-normal-*-34-*-*-*-*-*-*-*" -o 50 -p top -A center -d 2
</code>
}}
236d2972f9c6bd32fe6caeec7cbf45be539a6760
OSX/Building shared library
0
1485
3046
2313
2015-08-08T01:22:57Z
EXt
1
wikitext
text/x-wiki
{{Box code|GNU/Linux style|
gcc -fPIC -shared -o foo.so foo.c
}}
{{Box code|OSX style|
gcc -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
{{Box code|OSX universal bundle|
gcc -fPIC -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bundle -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
== Autohell issues ==
If you are using autohell with multiple -arch flags you need to disable the dependency tracker.
{{Box code||
./configure --disable-dependency-tracking
}}
[[Category:OSX]]
686a57ab15435ee864c7299007c8563f388f51e5
2313
2303
2009-02-18T12:10:07Z
194.47.147.122
0
wikitext
text/x-wiki
{{Box code|GNU/Linux style|
gcc -fPIC -shared -o foo.so foo.c
}}
{{Box code|OSX style|
gcc -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
{{Box code|OSX universal bundle|
gcc -fPIC -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bundle -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
== Autohell issues ==
If you are using autohell with multiple -arch flags you need to disable the dependency tracker.
{{Box code||
./configure --disable-dependency-tracking
}}
3d6a2921aa29d18b17b3b9ec7c127fab9a769027
2303
2285
2009-01-16T19:43:51Z
EXt
1
Added cflags for universal binaries
wikitext
text/x-wiki
{{Box code|GNU/Linux style|
gcc -fPIC -shared -o foo.so foo.c
}}
{{Box code|OSX style|
gcc -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
{{Box code|OSX universal bundle|
gcc -fPIC -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bundle -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
6856ed1776da7f6e24540a0fd77d8c55d0b0027a
2285
2008-10-22T10:26:19Z
EXt
1
New page: {{Box code|GNU/Linux style| gcc -fPIC -shared -o foo.so foo.c }} {{Box code|OSX style| gcc -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup -o foo.so foo.c }}
wikitext
text/x-wiki
{{Box code|GNU/Linux style|
gcc -fPIC -shared -o foo.so foo.c
}}
{{Box code|OSX style|
gcc -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup -o foo.so foo.c
}}
9b4b287440c0a7b085c682d5dec5b02333bb6f52
OSX/Environment
0
1494
3043
2331
2015-08-08T01:17:34Z
EXt
1
category
wikitext
text/x-wiki
The environment for OSX applications can be set in the {{Filename|~/.MacOSX/environment.plist}} file. If the file or directory doesn't exists it must be created manually. The file is a normal plist-file with a list of key-value pairs.
== External links ==
* [http://developer.apple.com/qa/qa2001/qa1067.html http://developer.apple.com/qa/qa2001/qa1067.html]
[[Category:OSX]]
3e522d9a081b5dce9d7e9eb4453d735be9aeae3d
2331
2009-06-15T11:17:04Z
EXt
1
New page: The environment for OSX applications can be set in the {{Filename|~/.MacOSX/environment.plist}} file. If the file or directory doesn't exists it must be created manually. The file is a nor...
wikitext
text/x-wiki
The environment for OSX applications can be set in the {{Filename|~/.MacOSX/environment.plist}} file. If the file or directory doesn't exists it must be created manually. The file is a normal plist-file with a list of key-value pairs.
== External links ==
* [http://developer.apple.com/qa/qa2001/qa1067.html http://developer.apple.com/qa/qa2001/qa1067.html]
89b16841959ab6e3cb20849491f68119529c1ed7
OSX/Pkg packages
0
1490
3042
2312
2015-08-08T01:12:12Z
EXt
1
cleanup
wikitext
text/x-wiki
First, find package in {{filename|/Library/Receipts}} and find the bom-file: {{filename|/Library/Receipts/<PACKAGE>/Contents/Archive.bom}}. The bom-file contains information about the packages installed files. OSX ships with two tools to handle bom-files, mkbom and lsbom. To uninstall a .pkg package you can use lsbom to list all files installed and batch remove them by piping to xargs rm or similar.
<shellbox title="List files installed by a package" lang="bash" noline>
lsbom Archive.bom -f -l -s Archive.bom
</shellbox>
<shellbox title="Remove all files" lang="bash" noline>
lsbom -f -l -s -pf Archive.bom | (cd /; xargs -n 1 rm)
</shellbox>
[[Category:OSX]]
785769789d5ea33e2831f46582a2f2555421b2ef
2312
2311
2009-02-14T08:18:22Z
EXt
1
wikitext
text/x-wiki
First, find package in {{filename|/Library/Receipts}} and find the bom-file: {{filename|/Library/Receipts/<PACKAGE>/Contents/Archive.bom}}. The bom-file contains information about the packages installed files. OSX ships with two tools to handle bom-files, mkbom and lsbom. To uninstall a .pkg package you can use lsbom to list all files installed and batch remove them by piping to xargs rm or similar.
{{Box code|List files installed by a package|
lsbom Archive.bom -f -l -s Archive.bom
}}
{{Box code|Remove all files|
lsbom -f -l -s -pf Archive.bom <nowiki>|</nowiki> (cd /; xargs -n 1 rm)
}}
7c602ed7311bc10c6446e37c5161b070e3045abc
2311
2009-02-13T18:44:54Z
EXt
1
New page: First, find package in {{filename|/Library/Receipts}} and find the bom-file: {{filename|/Library/Receipts/<PACKAGE>/Contents/Archive.bom}}. The bom-file contains information about the pack...
wikitext
text/x-wiki
First, find package in {{filename|/Library/Receipts}} and find the bom-file: {{filename|/Library/Receipts/<PACKAGE>/Contents/Archive.bom}}. The bom-file contains information about the packages installed files. OSX ships with two tools to handle bom-files, mkbom and lsbom. To uninstall a .pkg package you can use lsbom to list all files installed and batch remove them by piping to xargs rm or similar.
{{Box code|List files installed by a package|
lsbom Archive.bom -f -l -s Archive.bom
}}
{{Box code|Remove all files|
lsbom -f -l -s -pf Archive.bom | (cd /; xargs -n 1 rm)
}}
c291dc66a705128e9f131c2db297709ea82583fa
Opengl/windowless
0
1497
3094
2962
2018-02-26T18:52:48Z
EXt
1
/* Non-rendering context */
wikitext
text/x-wiki
<metadescription>OpenGL offscreen rendering without a window</metadescription>
<metakeywords>opengl, windowless, glx, root, offscreen</metakeywords>
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lX11 -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
static glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
static glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
GLXPbuffer pbuf;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
/* create temporary pbuffer */
int pbuffer_attribs[] = {
GLX_PBUFFER_WIDTH, 800,
GLX_PBUFFER_HEIGHT, 600,
None
};
pbuf = glXCreatePbuffer(dpy, fbc[0], pbuffer_attribs);
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, pbuf, pbuf, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL -lX11 windowless2.c
[[Category:OpenGL]]
a59268d9b68b0a04e5eb6ba37218bf0f89207513
2962
2961
2015-02-02T11:00:27Z
EXt
1
wikitext
text/x-wiki
<metadescription>OpenGL offscreen rendering without a window</metadescription>
<metakeywords>opengl, windowless, glx, root, offscreen</metakeywords>
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
static glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
static glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
GLXPbuffer pbuf;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
/* create temporary pbuffer */
int pbuffer_attribs[] = {
GLX_PBUFFER_WIDTH, 800,
GLX_PBUFFER_HEIGHT, 600,
None
};
pbuf = glXCreatePbuffer(dpy, fbc[0], pbuffer_attribs);
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, pbuf, pbuf, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL -lX11 windowless2.c
[[Category:OpenGL]]
fb545c5b2c7ad684b999286b6393f9b69f861806
2961
2629
2015-02-02T10:57:59Z
EXt
1
wikitext
text/x-wiki
<metadescription>OpenGL offscreen rendering without a window</metadescription>
<metakeywords>opengl, windowless, glx, root, offscreen</metakeywords>
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
static glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
static glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
GLXPbuffer pbuf;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
/* create temporary pbuffer */
int pbuffer_attribs[] = {
GLX_PBUFFER_WIDTH, 800,
GLX_PBUFFER_HEIGHT, 600,
None
};
pbuf = glXCreatePbuffer(dpy, fbc[0], pbuffer_attribs);
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, pbuf, pbuf, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless2.c
[[Category:OpenGL]]
e8c74004cfa55b758cf06a937db79f9a79780f55
2629
2588
2012-01-27T13:03:26Z
EXt
1
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
static glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
static glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
GLXPbuffer pbuf;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
/* create temporary pbuffer */
int pbuffer_attribs[] = {
GLX_PBUFFER_WIDTH, 800,
GLX_PBUFFER_HEIGHT, 600,
None
};
pbuf = glXCreatePbuffer(dpy, fbc[0], pbuffer_attribs);
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, pbuf, pbuf, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless2.c
[[Category:OpenGL]]
a34e210610626eeec979c6d829b4e051f4f58f1c
2588
2466
2012-01-15T00:56:57Z
EXt
1
/* Offscreen rendering only */ added pbuffer so something can be rendered too
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
static glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
static glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
GLXPbuffer pbuf;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
/* create temporary pbuffer */
int pbuffer_attribs[] = {
GLX_PBUFFER_WIDTH, 800,
GLX_PBUFFER_HEIGHT, 600,
None
};
pbuf = glXCreatePbuffer(dpy, fbc[0], pbuffer_attribs);
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, pbuf, pbuf, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless2.c
ac5d4706e332776895a61dfeb34ffe0dc03b1e1a
2466
2464
2010-12-28T21:46:55Z
EXt
1
test
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox filename="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox filename="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless2.c
a3520aec0d51c9cdb195673f31f66833d8492716
2464
2389
2010-12-27T15:04:06Z
EXt
1
proper codebox
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
<codebox title="windowless1.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
<codebox title="windowless2.c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</codebox>
Compile with:
gcc -Wall -lGL windowless2.c
b60c98b1e721aba927a449f18a28bfe26ac18235
2389
2388
2010-06-02T08:50:25Z
194.47.150.15
0
Undo revision 2388 by [[Special:Contributions/194.47.150.15|194.47.150.15]] ([[User talk:194.47.150.15|Talk]])
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
2c6bba778b56d82e1b8d21c37001826006727cb0
2388
2387
2010-06-02T08:49:23Z
194.47.150.15
0
test
wikitext
text/x-wiki
{{#meta: keywords | test }}
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
8ebf1def4c1006b79e73cc05f1d1797f13b9084d
2387
2386
2010-06-02T08:06:25Z
194.47.150.15
0
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like <tt>glGetString</tt>) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX (<tt>DefaultRootWindow</tt>) or the desktop window (<tt>GetDesktopWindow</tt>) in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like <tt>glGetString</tt>.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
2c6bba778b56d82e1b8d21c37001826006727cb0
2386
2385
2010-06-02T07:27:35Z
194.47.150.15
0
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX or the desktop window in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like glGetString.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context[http://www.opengl.org/registry/specs/ARB/glx_create_context.txt][http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt] gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent. The description to MakeCurrent states that if you pass 0 as both read- and write-drawable "the context is made current without a default framebuffer".
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
626cb086bb4752d408a363cd856b6f9400d430e3
2385
2384
2010-06-02T07:20:14Z
194.47.150.15
0
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
A simple way to get an OpenGL context is to use the root window in GLX or the desktop window in Windows. While you're not allowed to do any rendering using this context it is enough to call functions like glGetString.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
57ee2f83fc43dfbf51cf7fd9839a5903b3257aea
2384
2383
2010-06-02T07:16:41Z
194.47.150.15
0
rephrasing introduction a bit
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without having a window; Which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or be able to render to a framebuffer and read the result back into a buffer.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
83dc4bd64d1d09fdd05ac965438f6469e031c7ec
2383
2382
2010-06-01T17:33:52Z
EXt
1
typo
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or to only render to a FBO, without having to create a window; even if the window is never shown.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless2.c
1d9f3a1465c6f819c1899e55c039833942ad445a
2382
2381
2010-06-01T17:31:44Z
EXt
1
Adding GLX_ARB_create_context method
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or to only render to a FBO, without having to create a window; even if the window is never shown.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
{{Box code|windowless2.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
typedef Bool (*glXMakeContextCurrentARBProc)(Display*, GLXDrawable, GLXDrawable, GLXContext);
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXMakeContextCurrentARBProc glXMakeContextCurrentARB = 0;
int main(int argc, const char* argv[]){
static int visual_attribs[] = {
None
};
int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 0,
None
};
Display* dpy = XOpenDisplay(0);
int fbcount = 0;
GLXFBConfig* fbc = NULL;
GLXContext ctx;
/* open display */
if ( ! (dpy = XOpenDisplay(0)) ){
fprintf(stderr, "Failed to open display\n");
exit(1);
}
/* Get framebuffer configs, any is usable (might want to add proper attribs) */
if ( !(fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), visual_attribs, &fbcount) ) ){
fprintf(stderr, "Failed to get FBConfig\n");
exit(1);
}
/* get the required extensions */
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
glXMakeContextCurrentARB = (glXMakeContextCurrentARBProc)glXGetProcAddressARB( (const GLubyte *) "glXMakeContextCurrent");
if ( !(glXCreateContextAttribsARB && glXMakeContextCurrentARB) ){
fprintf(stderr, "missing support for GLX_ARB_create_context\n");
XFree(fbc);
exit(1);
}
/* create a context using glXCreateContextAttribsARB */
if ( !( ctx = glXCreateContextAttribsARB(dpy, fbc[0], 0, True, context_attribs)) ){
fprintf(stderr, "Failed to create opengl context\n");
XFree(fbc);
exit(1);
}
XFree(fbc);
XSync(dpy, False);
/* try to make it the current context */
if ( !glXMakeContextCurrent(dpy, 0, 0, ctx) ){
/* some drivers does not support context without default framebuffer, so fallback on
* using the default window.
*/
if ( !glXMakeContextCurrent(dpy, DefaultRootWindow(dpy), DefaultRootWindow(dpy), ctx) ){
fprintf(stderr, "failed to make current\n");
exit(1);
}
}
/* try it out */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
Compile with:
gcc -Wall -lGL windowless2.c
d908642c7a27783473f945bf1189d2c373b1fb88
2381
2380
2010-05-27T20:16:39Z
EXt
1
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or to only render to a FBO, without having to create a window; even if the window is never shown.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
{{Box code|windowless1.c|
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
}}
Compile with:
gcc -Wall -lGL windowless1.c
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
a4f7d0a9ec604ffdb9d242e1dc224a9ee0bc008a
2380
2379
2010-05-27T20:11:16Z
EXt
1
adding code sample
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or to only render to a FBO, without having to create a window; even if the window is never shown.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
<code><cpp/>
#include <stdio.h>
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(int argc, const char* argv[]){
Display *dpy;
Window root;
GLint attr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
XVisualInfo *vi;
GLXContext glc;
/* open display */
if ( ! (dpy = XOpenDisplay(NULL)) ) {
fprintf(stderr, "cannot connect to X server\n\n");
exit(1);
}
/* get root window */
root = DefaultRootWindow(dpy);
/* get visual matching attr */
if( ! (vi = glXChooseVisual(dpy, 0, attr)) ) {
fprintf(stderr, "no appropriate visual found\n\n");
exit(1);
}
/* create a context using the root window */
if ( ! (glc = glXCreateContext(dpy, vi, NULL, GL_TRUE)) ){
fprintf(stderr, "failed to create context\n\n");
exit(1);
}
glXMakeCurrent(dpy, root, glc);
/* try it out, remember to *NOT* render to the default framebuffer! */
printf("vendor: %s\n", (const char*)glGetString(GL_VENDOR));
return 0;
}
</code>
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
abcf3296603c2f33ce6187a8f02bbcb1f482c9dd
2379
2010-05-25T19:14:32Z
EXt
1
New page: In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to eith...
wikitext
text/x-wiki
In general it isn't possible to create an OpenGL context without a window, which can be quite annoying depending on what you want to archive. More than once have I wished for a way to either call non-rendering functions (like glGetString) or to only render to a FBO, without having to create a window; even if the window is never shown.
= Non-rendering context =
In order to get a context which you aren't allow to render to you can either pass the root window window in glx or the desktop window in win32 to MakeCurrent.
= Offscreen rendering only =
Since OpenGL3 a new extension called ARB_create_context gives a new API to create an OpenGL context; This is the API needed to actually create an OpenGL3 context and it also allows us not to pass a window to MakeCurrent.
32e2c37345fa1f0b8294c6576b7bb395d3209dca
PHP/What I hate about PHP
0
1639
2796
2731
2013-07-05T19:01:20Z
EXt
1
wikitext
text/x-wiki
* Order of parameters is inconsistent, e.g. <tt>array_map</tt> and <tt>array_filter</tt>.
* <tt>mysqli::bind_param</tt> takes parameters by-reference instead of by-value:
** "<tt>Indirect modification of overloaded property</tt>"
** "<tt>Cannot pass parameter N by reference</tt>"
* <strike>Lacks <tt>try { .. } finally { .. }</tt> which is essential when releasing outside resources.</strike>. Fixed in PHP 5.5.
03cd861398a617d576814765cb8ed02d8102d265
2731
2730
2012-09-23T23:22:47Z
EXt
1
wikitext
text/x-wiki
* Order of parameters is inconsistent, e.g. <tt>array_map</tt> and <tt>array_filter</tt>.
* <tt>mysqli::bind_param</tt> takes parameters by-reference instead of by-value:
** "<tt>Indirect modification of overloaded property</tt>"
** "<tt>Cannot pass parameter N by reference</tt>"
* Lacks <tt>try { .. } finally { .. }</tt> which is essential when releasing outside resources.
ebf45336cac41e4ed9e4df42e49e4e325b9e0bcd
2730
2012-09-22T22:14:39Z
EXt
1
Created page with "* Order of parameters is inconsistent, e.g. array_map and array_filter."
wikitext
text/x-wiki
* Order of parameters is inconsistent, e.g. array_map and array_filter.
25e18c4d1c285c8f54f7563f911fb66bf40e47db
Point-in-polygon: Jordan Curve Theorem
0
1399
2478
2474
2010-12-29T17:10:29Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. An image explains more than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
<codebox title="Sample (naive) implementation">
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</codebox>
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
54586d397ebd889719269d2649e9c586ceeea69e
2474
2334
2010-12-29T15:49:36Z
EXt
1
proper codebox
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. An image explains more than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
<codebox>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</codebox>
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
93f383533ea4a8a26794a03af070c2c18d7950e3
2334
2167
2009-10-07T18:14:49Z
128.149.110.155
0
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. An image explains more than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
9feb297bead47a009f658c0821fbaee154bd146b
2167
2166
2008-01-13T15:34:08Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. An image explains more than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
696533be365885e830e5af1faefaa76e13bed033
2166
2160
2008-01-13T03:26:56Z
68.144.14.50
0
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains more than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
409c31c17c75accc490400cf7d5f15b5ca7f9732
2160
2149
2007-12-13T13:13:16Z
82.229.16.105
0
/* C/C++ implementation */
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( fabs(dx) < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
26177bb328e0aedb0964e020a820d0c5e4b47bc3
2149
2148
2007-11-29T11:11:54Z
EXt
1
Fixed case where dx == 0, but I havn't tried compiling it. Also, I'm not sure if INFINITY works with MSVC
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
static const float eps = 0.000001;
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k;
if ( dx < eps ){
k = INFINITY; // math.h
} else {
k = dy/dx;
}
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
af8d4e5243b605c3ad47d42137f61c7168270a66
2148
2135
2007-11-28T12:06:06Z
217.193.129.58
0
Corrected a problem at the boundaries which induces irrelevant vertical lines, PS please catch the case where dx = 0 in your implementation or reshape the final equation to avoid division
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px > x1 && px <= x2 && ( py < y[i] || py <= y[(i+1)%8] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
ed3eef0ab0ceb8c9378cba0f324abed25b236e18
2135
2076
2007-11-13T12:54:28Z
80.179.12.2
0
/* C/C++ implementation */
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px >= x1 && px <= x2 && ( py < y[i] || py < y[(i+1)%8] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossings % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
2bc892d24f206bb0040ed815c351f89eb395a877
2076
1979
2006-09-28T18:52:47Z
EXt
1
Added categories
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px >= x1 && px <= x2 && ( py < y[i] || py < y[(i+1)%4] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossing % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
[[Category: Math]]
[[Category: Physics]]
[[Category: C/Cpp]]
39a0c6919f309fabe370df350c8424eb3b8d5508
1979
1978
2006-07-25T16:27:09Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m\,</math> (Swedish notation). The slope is <math>k=\frac{\Delta\ y}{\Delta\ x}</math> and offset is <math>m=y-kx\,</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px >= x1 && px <= x2 && ( py < y[i] || py < y[(i+1)%4] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossing % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
a487a07fa5e8d8549b8357f8f25166ab9799dac5
1978
1977
2006-07-25T16:05:21Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costly calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Curve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-environment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straight line is <math>y=kx+m</math> (Swedish notation). The slope is <math>m=dy/dx</math> and offset is <math>m=y-kx</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate through each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px >= x1 && px <= x2 && ( py < y[i] || py < y[(i+1)%4] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossing % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
c25145e49db975c614c78a63b9420b9fe16f2a60
1977
1976
2006-07-25T15:09:13Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costy calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Cuve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-envirioment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straigt line is <math>y=kx+m</math> (swedish notation). The slope is <math>m=dy/dx</math> and offset is <math>m=y-kx</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
Repeat this for each line-segment.
== C/C++ implementation ==
{{Box code|A test case|
<code><cpp/>
/* The points creating the polygon. */
float x[8];
float y[8];
float x1,x2;
/* The coordinates of the point */
float px, py;
/* How many times the ray crosses a line-segment */
int crossings = 0;
/* Coordinates of the points */
x[0] = 100; y[0] = 100;
x[1] = 200; y[1] = 200;
x[2] = 300; y[2] = 200;
x[3] = 300; y[3] = 170;
x[4] = 240; y[4] = 170;
x[5] = 240; y[5] = 90;
x[6] = 330; y[6] = 140;
x[7] = 270; y[7] = 30;
/* Iterate throught each line */
for ( int i = 0; i < 8; i++ ){
/* This is done to ensure that we get the same result when
the line goes from left to right and right to left */
if ( x[i] < x[ (i+1)%8 ] ){
x1 = x[i];
x2 = x[(i+1)%8];
} else {
x1 = x[(i+1)%8];
x2 = x[i];
}
/* First check if the ray is possible to cross the line */
if ( px >= x1 && px <= x2 && ( py < y[i] || py < y[(i+1)%4] ) ) {
/* Calculate the equation of the line */
float dx = x[(i+1)%8] - x[i];
float dy = y[(i+1)%8] - y[i];
float k = dy/dx;
float m = y[i] - k * x[i];
/* Find if the ray crosses the line */
float y2 = k * px + m;
if ( py <= y2 ){
crossings++;
}
}
}
printf("The point is crossing %d lines", crossings);
if ( crossing % 2 == 1 ){
printf(" thus it is inside the polygon");
}
printf("\n");
</code>
}}
7a55be8e1945977c9c58235d8fc9163ea89bb1ce
1976
1975
2006-07-25T13:10:20Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costy calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Cuve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-envirioment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either. You can also check if the y-coordinate is above both points. The next step is to find the equation of the line. Hopefully you remember this from grade school. The equation of a straigt line is <math>y=kx+m</math> (swedish notation). The slope is <math>m=dy/dx</math> and offset is <math>m=y-kx</math>. Do the math we have the equation. Now, insert the x-coordinate of the point into the equation. If the result is larger than the y-coordinate the ray does not cross the line-segment.
3488c21fa432b83026d7eb40c6ff3bfce170d647
1975
1974
2006-07-25T12:32:26Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costy calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Cuve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow the rays from each point and count each time you cross a line-segment. In this article I only deal with 2D polygons but it can easily used in a 3D-envirioment.
== Find crossings ==
=== Casting a ray ===
One of the first things to do is to cast a ray from the point in an arbitrary direction. I use a ray along the Y axis (pointing upwards as in the picture) for simplicity. Along X-axis is good too, but use one of those or it gets a lot harder. Remember that I use the ray mentioned above throughout this article.
=== Finding the equation of a line-segment ===
As a first step, if the ray is along y-axis, check if the point x-coordinate is between the two points connecting the line. If not it don't cross it either.
cb8c91de924e31a572982df16c58b3465509fe8c
1974
2006-07-25T12:17:35Z
EXt
1
wikitext
text/x-wiki
Calculating whenever a point is inside a polygon can sometimes be a hard and costy calculation. This article describes a solution quite cheap solution to calculate whenever a point is inside ANY '''closed''' polygon. In an open polygon it's hard to determine what's in and out so naturally it won't work.
[[Image:Jordan curve polygon.png|frame|A closed polygon with 3 points marked]]
The Jordan Cuve Theorem states that a point is inside a polygon if the number of crossings from an arbitrary direction is odd. Any image explains move than a thousand words so lets take a look at the picture. As you can see point 1 and 3 is inside the polygon but point 2 isn't. Follow tha lines from each point and count each time you cross a line-segment.
3d9e9f3133d0b227e546e47ccd149cec9c90fffe
Programming/Calling conventions
0
1482
2323
2322
2009-04-24T16:39:42Z
EXt
1
Added MIPS
wikitext
text/x-wiki
== x86 ==
=== cdecl ===
* Keyword: (MSVC _cdecl, GCC cdecl)
* Compilers: Microsoft Visual C++, GCC
The cdecl calling convention is the standard convention for most x86 compilers. Arguments are pushed on the stack right to left. Return values are passed in EAX. The caller clean the stack.
=== Stdcall ===
* Keyword: MSVC __stdcall, GCC stdcall
* Compilers: Microsoft Visual C++, GCC
Like cdecl but the callee is cleaning the stack.
=== Fastcall ===
* Keyword: MSVC __fastcall, GCC fastcall
* Compilers: Microsoft Visual C++, GCC
The first two arguments are passed left to right in ECX and EDX. Remaining arguments are pushed onto the stack from right to left. The callee clean the stack.
=== Thiscall ===
Using MSVC, thiscall is similar to stdcall but the ''this'' pointer passed in ECX.
Using GCC, thiscall is similar to cdecl but the ''this'' pointer is pushed last onto the stack as if it would have been the first argument to the function.
== x64 ==
== MIPS ==
The MIPS passes the first four arguments to a function in the registers $a0-$a3; subsequent arguments are passed on the stack. The return value (or a pointer to it) is stored in register $v0.
7e134b1e2ca87c8588723233e29fa03a2dbd135c
2322
2274
2009-04-24T15:59:40Z
EXt
1
Added thiscall
wikitext
text/x-wiki
== x86 ==
=== cdecl ===
* Keyword: (MSVC _cdecl, GCC cdecl)
* Compilers: Microsoft Visual C++, GCC
The cdecl calling convention is the standard convention for most x86 compilers. Arguments are pushed on the stack right to left. Return values are passed in EAX. The caller clean the stack.
=== Stdcall ===
* Keyword: MSVC __stdcall, GCC stdcall
* Compilers: Microsoft Visual C++, GCC
Like cdecl but the callee is cleaning the stack.
=== Fastcall ===
* Keyword: MSVC __fastcall, GCC fastcall
* Compilers: Microsoft Visual C++, GCC
The first two arguments are passed left to right in ECX and EDX. Remaining arguments are pushed onto the stack from right to left. The callee clean the stack.
=== Thiscall ===
Using MSVC, thiscall is similar to stdcall but the ''this'' pointer passed in ECX.
Using GCC, thiscall is similar to cdecl but the ''this'' pointer is pushed last onto the stack as if it would have been the first argument to the function.
== x64 ==
1470e93b5c7920e27951b9eb3136002d707e978a
2274
2273
2008-08-18T11:02:53Z
EXt
1
stdcall
wikitext
text/x-wiki
== x86 ==
=== cdecl ===
* Keyword: (MSVC _cdecl, GCC cdecl)
* Compilers: Microsoft Visual C++, GCC
The cdecl calling convention is the standard convention for most x86 compilers. Arguments are pushed on the stack right to left. Return values are passed in EAX. The caller clean the stack.
=== Stdcall ===
* Keyword: MSVC __stdcall, GCC stdcall
* Compilers: Microsoft Visual C++, GCC
Like cdecl but the callee is cleaning the stack.
=== Fastcall ===
* Keyword: MSVC __fastcall, GCC fastcall
* Compilers: Microsoft Visual C++, GCC
The first two arguments are passed left to right in ECX and EDX. Remaining arguments are pushed onto the stack from right to left. The callee clean the stack.
== x64 ==
b4cc4a39a19d0be5f998695f027f5a1c4db48db3
2273
2272
2008-08-18T10:53:05Z
EXt
1
wikitext
text/x-wiki
== x86 ==
=== cdecl ===
* Keyword: (MSVC _cdecl, GCC cdecl)
* Compilers: Microsoft Visual C++, GCC
The cdecl calling convention is the standard convention for most x86 compilers. Arguments are pushed on the stack right to left. Return values are passed in EAX. The caller clean the stack.
=== Fastcall ===
* Keyword: MSVC __fastcall, GCC fastcall
* Compilers: Microsoft Visual C++, GCC
The first two arguments are passed left to right in ECX and EDX. Remaining arguments are pushed onto the stack from right to left. The callee clean the stack.
== x64 ==
b879658f1bf95c77ad08fd9efd363fe08fc7cb3c
2272
2271
2008-08-18T10:36:16Z
EXt
1
fastcall
wikitext
text/x-wiki
== x86 ==
=== Fastcall ===
* Keyword: __fastcall
* Compilers: Microsoft Visual C++, GCC
The first two arguments are passed left to right in ECX and EDX. Remaining arguments are pushed onto the stack from right to left. The callee cleans up the stack.
== x64 ==
a6b9588f6d933f18b26afc3a87ce3d7b66c115f9
2271
2008-08-18T09:56:27Z
EXt
1
New page: == x86 == == x64 ==
wikitext
text/x-wiki
== x86 ==
== x64 ==
0ea9d1c193d3de961d4be50969b9ae31d79332d0
Reading keycodes instead of ASCII
0
1424
2463
2357
2010-12-27T15:01:06Z
EXt
1
proper codebox
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
== Why? ==
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
== Introducing keycodes ==
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
== Why can't the DVORAK users just change controls in the game? ==
Because it is annoying! It's not our fault you programmers are lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to convert DVORAK to QWERTY to get the original controls.
== My game requires text input ==
This is an interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually already do this whether you know it or not.
== Sample ==
<codebox title="Pseudocode">
case KEYDOWN:
keycode = event.key.keycode
action = actionMap[keycode]
ascii = KeycodeToASCII(keycode)
OnKeyDown(action, ascii)
</codebox>
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ASCII. Then they are passed to the input handler that figures out what to do with this. It is also worth to note that when converting a keycode you must also know which modifiers that affect that key right now. But as far as I know the system events raised upon a keypress contains enough information on all platforms.
== Sample (XLib) ==
This sample is from production code. It does not map to an action but it sends the keycode and ASCII to the event manager. For a non-translatable character like ESC a NULL-terminator is returned.
<codebox title="Xlib event loop">
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
/* Snip... */
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len == 0 ){
buf[0] = '\0';
}
EventManager::singletonPtr()->dispatch(EventKeyboard::create(event.xkey.keycode,buf[0]));
break;
/* Snip... */
}
</codebox>
679742bf0393741e6980d127d9ce54d8f89802c3
2357
2356
2010-02-20T04:02:41Z
201.67.12.175
0
/* My game requires text input */ typo
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
== Why? ==
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
== Introducing keycodes ==
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
== Why can't the DVORAK users just change controls in the game? ==
Because it is annoying! It's not our fault you programmers are lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to convert DVORAK to QWERTY to get the original controls.
== My game requires text input ==
This is an interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually already do this whether you know it or not.
== Sample ==
{{Box code|Pseudocode|
case KEYDOWN:
<nowiki>keycode = event.key.keycode</nowiki>
<nowiki>action = actionMap[keycode]</nowiki>
<nowiki>ascii = KeycodeToASCII(keycode)</nowiki>
<nowiki>OnKeyDown(action, ascii)</nowiki>
}}
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ASCII. Then they are passed to the input handler that figures out what to do with this. It is also worth to note that when converting a keycode you must also know which modifiers that affect that key right now. But as far as I know the system events raised upon a keypress contains enough information on all platforms.
== Sample (XLib) ==
This sample is from production code. It does not map to an action but it sends the keycode and ASCII to the event manager. For a non-translatable character like ESC a NULL-terminator is returned.
{{Box code|Xlib event loop|
<code><cpp/>
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
/* Snip... */
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len == 0 ){
buf[0] = '\0';
}
EventManager::singletonPtr()->dispatch(EventKeyboard::create(event.xkey.keycode,buf[0]));
break;
/* Snip... */
}
</code>
}}
61192c787519ee0bdf7e08b20ee0a0ef4a8651f1
2356
2100
2010-02-20T04:01:35Z
201.67.12.175
0
/* Why can't the DVORAK users just change controls in the game? */ this sentence makes no sense
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
== Why? ==
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
== Introducing keycodes ==
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
== Why can't the DVORAK users just change controls in the game? ==
Because it is annoying! It's not our fault you programmers are lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to convert DVORAK to QWERTY to get the original controls.
== My game requires text input ==
This is an interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually already do this whenever you know it or not.
== Sample ==
{{Box code|Pseudocode|
case KEYDOWN:
<nowiki>keycode = event.key.keycode</nowiki>
<nowiki>action = actionMap[keycode]</nowiki>
<nowiki>ascii = KeycodeToASCII(keycode)</nowiki>
<nowiki>OnKeyDown(action, ascii)</nowiki>
}}
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ASCII. Then they are passed to the input handler that figures out what to do with this. It is also worth to note that when converting a keycode you must also know which modifiers that affect that key right now. But as far as I know the system events raised upon a keypress contains enough information on all platforms.
== Sample (XLib) ==
This sample is from production code. It does not map to an action but it sends the keycode and ASCII to the event manager. For a non-translatable character like ESC a NULL-terminator is returned.
{{Box code|Xlib event loop|
<code><cpp/>
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
/* Snip... */
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len == 0 ){
buf[0] = '\0';
}
EventManager::singletonPtr()->dispatch(EventKeyboard::create(event.xkey.keycode,buf[0]));
break;
/* Snip... */
}
</code>
}}
0a9f832d590c2af139dccb09926e9a0580677448
2100
2099
2006-12-11T21:45:22Z
EXt
1
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
== Why? ==
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
== Introducing keycodes ==
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
== Why can't the DVORAK users just change controls in the game? ==
Because it is annoying! It's not our fault your programmers lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to convert DVORAK to QWERTY to get the original controls.
== My game requires text input ==
This is an interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually already do this whenever you know it or not.
== Sample ==
{{Box code|Pseudocode|
case KEYDOWN:
<nowiki>keycode = event.key.keycode</nowiki>
<nowiki>action = actionMap[keycode]</nowiki>
<nowiki>ascii = KeycodeToASCII(keycode)</nowiki>
<nowiki>OnKeyDown(action, ascii)</nowiki>
}}
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ASCII. Then they are passed to the input handler that figures out what to do with this. It is also worth to note that when converting a keycode you must also know which modifiers that affect that key right now. But as far as I know the system events raised upon a keypress contains enough information on all platforms.
== Sample (XLib) ==
This sample is from production code. It does not map to an action but it sends the keycode and ASCII to the event manager. For a non-translatable character like ESC a NULL-terminator is returned.
{{Box code|Xlib event loop|
<code><cpp/>
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
/* Snip... */
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len == 0 ){
buf[0] = '\0';
}
EventManager::singletonPtr()->dispatch(EventKeyboard::create(event.xkey.keycode,buf[0]));
break;
/* Snip... */
}
</code>
}}
b0a3deefeff9e4f703357d1c2b905949c426f15d
2099
2098
2006-12-11T21:30:17Z
EXt
1
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
=== Why? ===
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
=== Introducing keycodes ===
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
=== Why can't the DVORAK users just change controls in the game? ===
Because it is annoying! It's not our fault your programmers lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to convert DVORAK to QWERTY to get the original controls.
=== My game requires text input ===
This is an interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually already do this whenever you know it or not.
=== Sample ===
{{Box code|Pseudocode|
case KEYDOWN:
<nowiki>keycode = event.key.keycode</nowiki>
<nowiki>action = actionMap[keycode]</nowiki>
<nowiki>ascii = KeycodeToASCII(keycode)</nowiki>
<nowiki>OnKeyDown(action, ascii)</nowiki>
}}
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ascii. Then they are passed to the input handler that figures out what to do with this.
14ccf3190cd1e472e9390ff559c56a2ffc1d5e55
2098
2097
2006-12-11T21:28:00Z
EXt
1
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
=== Why? ===
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second, even the QWERTY layout is different due to international keyboards.
=== Introducing keycodes ===
A keycode is a unique identifier that is associated a physical key. Not the meaning of the key, only the physical key. The keycode tells us nothing of it's meaning. In games this doesn't usually matter since we don't need what the OS thinks a key means, we assign meaning to the keys ourself. So instead of mapping "W" to "FORWARD" we map the corresponding keycode to "FORWARD".
=== Why can't the DVORAK users just change controls in the game? ===
Because it's to annoying! It's not our fault your programmers lazy. Also, say we don't feel like knowing the entire QWERTY layout in our head and be able to map DVORAK to QWERTY to get the original controls.
=== My game requires text input ===
This is the interesting part. Just ask the OS to convert the keycode to ASCII. Actually, if you map action against ASCII you usually do this already whenever you know it or not.
=== Sample ===
{{Box code|Pseudocode|
case KEYDOWN:
<nowiki>keycode = event.key.keycode</nowiki>
<nowiki>action = actionMap[keycode]</nowiki>
<nowiki>ascii = KeycodeToASCII(keycode)</nowiki>
<nowiki>OnKeyDown(action, ascii)</nowiki>
}}
This is my preferred method of reading input. When a key is pressed the keycode is read and mapped to an action and ascii. Then they are passed to the input handler that figures out what to do with this.
ad54b3ebd0bbc90235f27784834bcdc7cb3f2667
2097
2006-12-11T14:04:36Z
EXt
1
wikitext
text/x-wiki
This is an urgent request to all game developers! Please stop using the ASCII characters as input in games!
=== Why? ===
There is a good reason for this. The first and most important point is that people use different keyboard layouts. On a typical DVORAK keyboard "WASD" is spread across the keyboard. It's like using ",ALH" on a QWERTY keyboard. Second even the QWERTY layout is different due to international keyboards.
60aec66ee31c4ef700c490573a99fbb103a62475
Sandbox
0
1400
2948
2947
2013-09-07T14:49:56Z
Test
99
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)\cdot\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)\cdot\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A\cdot\mathbf{n}+\frac{j}{M^A}\mathbf{n}\cdot\mathbf{n}-\mathbf{v}_1^B\cdot\mathbf{n}+\frac{j}{M^B}\mathbf{n}\cdot\mathbf{n}=-e\mathbf{v}_1^{AB}\cdot\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
[http://example.net]
[http://example.net]
068fd5e91a699121197a27e6723e92e5a24b1d5e
2947
1986
2013-09-07T14:44:35Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)\cdot\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)\cdot\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A\cdot\mathbf{n}+\frac{j}{M^A}\mathbf{n}\cdot\mathbf{n}-\mathbf{v}_1^B\cdot\mathbf{n}+\frac{j}{M^B}\mathbf{n}\cdot\mathbf{n}=-e\mathbf{v}_1^{AB}\cdot\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
[http://example.net]
4ba13190e01b921ff66caf933b96927ddcf1e67d
1986
1985
2006-07-27T13:16:07Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)\cdot\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)\cdot\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A\cdot\mathbf{n}+\frac{j}{M^A}\mathbf{n}\cdot\mathbf{n}-\mathbf{v}_1^B\cdot\mathbf{n}+\frac{j}{M^B}\mathbf{n}\cdot\mathbf{n}=-e\mathbf{v}_1^{AB}\cdot\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}\cdot\mathbf{n}}{\mathbf{n}\cdot\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
b692c0d4af6758f37fdca6c2607c673e7fc97cee
1985
1984
2006-07-27T13:06:56Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)*\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)*\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A*\mathbf{n}+\frac{j}{M^A}\mathbf{n}*\mathbf{n}-\mathbf{v}_1^B*\mathbf{n}+\frac{j}{M^B}\mathbf{n}*\mathbf{n}=-e\mathbf{v}_1^{AB}*\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}*\mathbf{n}}{\mathbf{n}*\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
012c09d386262b0cc2f454146b9bd443c7581b84
1984
1983
2006-07-27T13:06:31Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)*\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)*\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A*\mathbf{n}+\frac{j}{M^A}\mathbf{n}*\mathbf{n}-\mathbf{v}_1^B*\mathbf{n}+\frac{j}{M^B}\mathbf{n}*\mathbf{n}=-e\mathbf{v}_1^{AB}*\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}*\mathbf{n}}{\mathbf{n}*\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
601a94a06de987777d47a59377987e911a790101
1983
1982
2006-07-27T13:04:22Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)*\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)*\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A*\mathbf{n}+\frac{j}{M^A}\mathbf{n}*\mathbf{n}-\mathbf{v}_1^B*\mathbf{n}+\frac{j}{M^B}\mathbf{n}*\mathbf{n}=-e\mathbf{v}_1^{AB}*\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)\mathbf{v}_1^{AB}*\mathbf{n}}{\mathbf{n}*\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
5f3d304874e78661b68520caba69ecc4543bc0f7
1982
1981
2006-07-27T13:03:20Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}\mathbf{n}</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}\mathbf{n}</math>
Eq 2: <math>(\mathbf{v}_2^A-\mathbf{v}_2^B)*\mathbf{n}=-e(\mathbf{v}_1^A-\mathbf{v}_1^B)*\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A*\mathbf{n}+\frac{j}{M^A}\mathbf{n}*\mathbf{n}-\mathbf{v}_1^B*\mathbf{n}+\frac{j}{M^B}\mathbf{n}*\mathbf{n}=-e\mathbf{v}_1^{AB}*\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)v_1^{AB}*\mathbf{n}}{\mathbf{n}*\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
87c9ed82bf09234a9d4f600d6bef40c526387b8d
1981
1980
2006-07-27T13:02:09Z
EXt
1
wikitext
text/x-wiki
Eq 1a: <math>\mathbf{v}_2^A = \mathbf{v}_1^A + \frac{j}{M^A}n</math>
Eq 1b: <math>\mathbf{v}_2^B = \mathbf{v}_1^B + \frac{j}{M^B}n</math>
Eq 2: <math>(v_2^A-v_2^B)*\mathbf{n}=-e(v_1^A-v_1^B)*\mathbf{n}</math>
Eq 3: <math>\mathbf{v}_1^A*\mathbf{n}+\frac{j}{M^A}\mathbf{n}*\mathbf{n}-\mathbf{v}_1^B*\mathbf{n}+\frac{j}{M^B}\mathbf{n}*\mathbf{n}=-e\mathbf{v}_1^{AB}*\mathbf{n}</math>
Eq 4: <math>j = \frac{-(1+e)v_1^{AB}*\mathbf{n}}{\mathbf{n}*\mathbf{n}(\frac{1}{M^A}+\frac{1}{M^B})}</math>
7d59f25f290e8c5d21cf0f8e4cdd118ab241c076
1980
2006-07-26T19:00:27Z
EXt
1
wikitext
text/x-wiki
<math>(v_2^A-v_2^B)*n=-e(v_1^A-v_1^A)*n</math>
<math>j = \frac{-(1+e)v_1^{AB}*n}{n*n(\frac{1}{M^A}+\frac{1}{M^B})}</math>
25ba75b78e58d823c3082c936dcb1dba0f3c630d
Skybox tutorial
0
1365
2627
2500
2012-01-27T13:03:06Z
EXt
1
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image is nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
<codebox title="Load a texture">
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</codebox>
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
<codebox title="Rendering">
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</codebox>
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
[[Category:OpenGL]]
5db4b85ad57ba6f2fffa58d37c3b998fb88a52e3
2500
2499
2011-06-27T13:36:53Z
EXt
1
Reverted edits by [[Special:Contributions/88.81.225.162|88.81.225.162]] ([[User talk:88.81.225.162|talk]]) to last revision by [[User:77.3.26.22|77.3.26.22]]
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image is nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
<codebox title="Load a texture">
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</codebox>
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
<codebox title="Rendering">
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</codebox>
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
0387d23e64012c619549e6a67b55698770979fae
2499
2487
2011-06-23T05:19:53Z
88.81.225.162
0
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image is nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is [http://www.asiawriters.com freelance writing jobs], just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
<codebox title="Load a texture">
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</codebox>
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
<codebox title="Rendering">
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</codebox>
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
a6dc040d464b73658fe6d801d843edbdb9564d4a
2487
2473
2011-02-27T12:22:37Z
77.3.26.22
0
/* Preface */ typo
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image is nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
<codebox title="Load a texture">
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</codebox>
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
<codebox title="Rendering">
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</codebox>
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
0387d23e64012c619549e6a67b55698770979fae
2473
2321
2010-12-29T15:48:27Z
EXt
1
proper codebox
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
<codebox title="Load a texture">
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</codebox>
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
<codebox title="Rendering">
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</codebox>
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
5978a7c23c6d8cebc96f22a8c2c21316f9bcb307
2321
2196
2009-03-31T17:39:44Z
205.211.52.10
0
/* Tips&Tricks */
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There are many things that can improve the quality of the skybox. Here are a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
8245b3612dbbc0b74ee051fc9796292320b21b44
2196
2164
2008-05-06T12:51:47Z
EXt
1
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best. A skybox is a box which seems to contain the entire scene and is rendered from the inside. The skybox is always rendered before the other geometry in the scene with depthtesting off.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
00d5dce06cdc87a23ec32efc2a6c6ac1db4f4cca
2164
2163
2007-12-13T23:47:28Z
EXt
1
Better sample
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 1x1x1 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See below). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
// Store the current matrix
glPushMatrix();
// Reset and transform the matrix.
glLoadIdentity();
gluLookAt(
0,0,0,
camera->x(),camera->y(),camera->z(),
0,1,0);
// Enable/Disable features
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
// Just in case we set all vertices to white.
glColor4f(1,1,1,1);
// Render the front quad
glBindTexture(GL_TEXTURE_2D, _skybox[0]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the left quad
glBindTexture(GL_TEXTURE_2D, _skybox[1]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glEnd();
// Render the back quad
glBindTexture(GL_TEXTURE_2D, _skybox[2]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glEnd();
// Render the right quad
glBindTexture(GL_TEXTURE_2D, _skybox[3]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(1, 0); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glEnd();
// Render the top quad
glBindTexture(GL_TEXTURE_2D, _skybox[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 1); glVertex3f( -0.5f, 0.5f, -0.5f );
glTexCoord2f(0, 0); glVertex3f( -0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, 0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, 0.5f, -0.5f );
glEnd();
// Render the bottom quad
glBindTexture(GL_TEXTURE_2D, _skybox[5]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex3f( -0.5f, -0.5f, -0.5f );
glTexCoord2f(0, 1); glVertex3f( -0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 1); glVertex3f( 0.5f, -0.5f, 0.5f );
glTexCoord2f(1, 0); glVertex3f( 0.5f, -0.5f, -0.5f );
glEnd();
// Restore enable bits and matrix
glPopAttrib();
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The camera transformation is a little bit special when rendering a skybox. We never translates by the camera position, only rotation is applied. This is because the skybox never moves. It is always positioned at origo (0,0,0). Below is a sample of the skybox in use. The rendering above could easily be optimized in numerous ways but for clarity it is kept simple.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
897e44a58af55bb12a10e72e24f8eb53d6de62a3
2163
2162
2007-12-13T23:30:35Z
EXt
1
/* Theory */ Spelling
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn off interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
0402858a7575f64d8e06f0d722ae36b851845f00
2162
2161
2007-12-13T23:30:06Z
EXt
1
/* Theory */ Emphasis in texture filters
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. '''In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST.''' Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
8ec08391c5f68740f924863c6d2055aa14aa3fad
2161
2004
2007-12-13T23:28:15Z
EXt
1
Link to Hazel Whorley
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
* [http://www.hazelwhorley.com/textures.html Hazel Whorley] - Some excellent skybox textures, free for noncommersial usage.
6eb338408f77aaabea888ac430c3f38f4b00f39e
2004
1962
2006-08-01T23:18:13Z
EXt
1
/* Terragen */
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen.
== Links ==
* [http://www.planetside.co.uk/terragen/ Terragen]
* [http://developer.valvesoftware.com/wiki/Main_Page Valve Developer Community] ([http://developer.valvesoftware.com/wiki/Skybox_%282D%29_with_Terragen Skybox (2D) with Terragen])
bb99c152b7eff0ea0a6d6c84047cce7960096f2a
1962
1959
2006-07-21T14:52:05Z
EXt
1
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
[[Image:texture.png|frame|'''Fig 1'''. 6 textures added as an unwrapped box]]
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
[[Image:sample.png|frame|'''Fig 2'''. The skybox is rendered in the background with 3 crates and a grid]]
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
<div style="clear: both;"></div>
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
[http://www.planetside.co.uk/terragen/ http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
e0429b8f6aab741b488aca2aaa21a83529a7fe97
1959
1376
2006-07-21T14:38:59Z
EXt
1
wikitext
text/x-wiki
== Preface ==
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
== Theory ==
=== Geometry ===
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
=== Texture ===
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
Fig 1. 6 textures added as an unwrapped box
=== Simple skybox ===
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
{{Box code|Load a texture|
<code><cpp/>
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
</code>
}}
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
{{Box code|Rendering|
<code><cpp/>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
}}
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
Fig 2. The skybox is rendered in the background with 3 crates and a grid
== Tips&Tricks ==
There is lots of things to do to improve the quality of the skybox, here I will list a few:
=== Moving clouds ===
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
=== Sun ===
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
=== Day & night ===
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
== Terragen ==
[http://www.planetside.co.uk/terragen/ http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
fb869ee2c186a39e6e482f2a1ee7676d749ea7cd
1376
1375
2006-05-06T13:34:06Z
EXt
1
wikitext
text/x-wiki
=== Preface ===
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
=== Theory ===
==== Geometry ====
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
==== Texture ====
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
Fig 1. 6 textures added as an unwrapped box
==== Simple skybox ====
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(
vertices[i+j*verticesPerPolygon].u,
vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we
disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
Fig 2. The skybox is rendered in the background with 3 crates and a grid
=== Tips&Tricks ===
There is lots of things to do to improve the quality of the skybox, here I will list a few:
==== Moving clouds ====
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
==== Sun ====
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
==== Day & night ====
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
=== Terragen ===
[http://www.planetside.co.uk/terragen/ http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
d2d5d1068619b8e16a6bb85b1c495e7f8d432385
1375
1374
2006-05-06T13:33:14Z
EXt
1
wikitext
text/x-wiki
=== Preface ===
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
=== Theory ===
==== Geometry ====
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
==== Texture ====
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
Fig 1. 6 textures added as an unwrapped box
==== Simple skybox ====
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(vertices[i+j*verticesPerPolygon].u,vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we
disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
Fig 2. The skybox is rendered in the background with 3 crates and a grid
=== Tips&Tricks ===
There is lots of things to do to improve the quality of the skybox, here I will list a few:
==== Moving clouds ====
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
==== Sun ====
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
==== Day & night ====
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
=== Terragen ===
[http://www.planetside.co.uk/terragen/ http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
86417e52ca6c549def9cc0c2b591239c47f18bc0
1374
1373
2006-05-06T13:21:06Z
EXt
1
wikitext
text/x-wiki
=== Preface ===
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
=== Theory ===
==== Geometry ====
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
==== Texture ====
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
Fig 1. 6 textures added as an unwrapped box
==== Simple skybox ====
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
<code>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(vertices[i+j*verticesPerPolygon].u,vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we
disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
Fig 2. The skybox is rendered in the background with 3 crates and a grid
=== Tips&Tricks ===
There is lots of things to do to improve the quality of the skybox, here I will list a few:
==== Moving clouds ====
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
==== Sun ====
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
==== Day & night ====
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
=== Terragen ===
[http://www.planetside.co.uk/terragen/ http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
aa2cc1cdd128eec9ee916655d188e79927a85c5d
1373
2006-05-06T13:20:27Z
EXt
1
wikitext
text/x-wiki
=== Preface ===
This article is assumes you have some basic understanding of OpenGl.
In many 3D-games today we see an image in the background. The image in nicely rotated when we look around. There are some different methods to produce this effect but the skybox is the easiest and probably the best.
=== Theory ===
==== Geometry ====
The geometry of the skybox is simple, just a box. However, keep in mind that we are inside the box and the sides must face us. We will be using GL_QUADS to make the box. The box will be 2x2x2 units in size. We never want to go to the edge of the box so we will use a little trick, we position the camera in the middle of the box each time it is rendered. Also, make sure that the depthtesting is disabled, lighting should also be disabled but some neat day/night effect maybe could be produced by using lighting, your call.
==== Texture ====
The next thing is the texture. A skybox could contain either 5 or 6 textures depending on whenever the bottom is visible or not. The texture itself should be divided to 5 or 6 parts, one for each quad.
The image below is an unwrapped box, this is an example of how you could wrap your textures. It doesn't really matter as long as you know which one that belongs the each quad. To generate my textures I use Terragen (See chapter V). One issue we might run into is edges in corners, to prevent this we tell OpenGL to use GL_CLAMP as texturewrapper. This should pretty much conclude everything about a basic skybox, so onto the code.
Fig 1. 6 textures added as an unwrapped box
==== Simple skybox ====
As I alread said I assume some knowledge in OpenGL so you should know how to make the box itself, just remember that we are inside the box. In my examples I have 6 quads. First I will show you how to load your textures:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
As explained above this makes sure the textures displayed correctly and no edges will appear on the quads. In some cases we need to turn of interpolation too. Just set GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER to GL_NEAREST. Below is a sample routine to render the skybox. All lines will be explained later.
<code>
glPushMatrix();
glLoadIdentity();
gluLookAt(0,0,0,camera->TargetX(),camera->TargetY(),camera->TargetZ(),0,1,0);
glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
VERTEX tmp;
/* Perform the rendering */
/* We have 6 faces (quads) in the skybox we need to loop through */
for (int j=0;j<6;j++){
/* Read the normal of the quad */
tmp.x = normals[j].x;
tmp.y = normals[j].y;
tmp.z = normals[j].z;
glNormal3f(tmp.x,tmp.y,tmp.z);
glBindTexture(GL_TEXTURE_2D, texture[j]);
glBegin(mode);
{
/* loop through all vertices in the quad */
for (int i=0;i<verticesPerPolygon;i++){
glTexCoord2f(vertices[i+j*verticesPerPolygon].u,vertices[i+j*verticesPerPolygon].v);
glVertex3f(
vertices[i+j*verticesPerPolygon].x,
vertices[i+j*verticesPerPolygon].y,
vertices[i+j*verticesPerPolygon].z);
}
}
glEnd();
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glPopMatrix();
</code>
The first lines, glPushMatrix and glLoadIdentity, just saves the matrix and resets it. The next think we do is position the camera at origo (0,0,0) and have it look in whatever direction we are looking. Next we
disable depthtesting and lighting. I then work with one quad at the time. I set the normal of the face (pre-calculated) and the texture, and then i loop through all vertices in that quad. To finish up we turn depthtesting and lighting back on and revert to the old matrix. Below is a sample of the skybox in use.
Fig 2. The skybox is rendered in the background with 3 crates and a grid
=== Tips&Tricks ===
There is lots of things to do to improve the quality of the skybox, here I will list a few:
==== Moving clouds ====
Create a plane inside the skybox, let it have transparent edges and a texture with transparent clounds. Animate the texture coordinates in a given direction.
==== Sun ====
Add a lightsource in the spot that the sun would be and add a large lensflare. Alphablending a white fullscreen quad when you look toward it really makes you think you look into the sun.
==== Day & night ====
Either animate the texture or very slowly fade between two skyboxes. Also remember to adjust the ambient lighting to make it darker at night.
=== Terragen ===
[http://www.planetside.co.uk/terragen/]
Terragen is a tool to generate terrains but it works perfectly for generating skybox-textures too. I won't go into details but this is the basics. Position the camera in the center. Make sure the zoom is 1.0 or
the image won't fit together. Adjust roll, yaw and pitch for each image you take. The Valve Developer Community has a nice tutorial and automated script for generating textures with terragen
542a73230a4c1b36c5ab13b9a78949177b59b842
Sort folders by size
0
1506
2596
2485
2012-01-27T12:21:32Z
EXt
1
wikitext
text/x-wiki
It seems like many people don't know about some new flags for <tt>du</tt> and <tt>sort</tt>.
<codebox title="summarize target size" lang="bash">
du --summarize /path/to/target
</codebox>
The <tt>--summarize</tt> flag shows the total size of target only.
<codebox title="Sort human readable numbers" lang="bash">
sort -h
</codebox>
<tt>-h</tt> will sort like <tt>-n</tt> but supports suffixes like 14K.
<codebox title="Sort folder content by size" lang="bash">
du -h --summarize /path/to/target/* | sort -h
</codebox>
[[Category:Linux]]
5b3d6f8ec6ab24d139b4dcea0af9e39d9525aa70
2485
2011-02-18T12:58:10Z
EXt
1
Created page with "It seems like many people don't know about some new flags for <tt>du</tt> and <tt>sort</tt>. <codebox title="summarize target size" lang="bash"> du --summarize /path/to/target <..."
wikitext
text/x-wiki
It seems like many people don't know about some new flags for <tt>du</tt> and <tt>sort</tt>.
<codebox title="summarize target size" lang="bash">
du --summarize /path/to/target
</codebox>
The <tt>--summarize</tt> flag shows the total size of target only.
<codebox title="Sort human readable numbers" lang="bash">
sort -h
</codebox>
<tt>-h</tt> will sort like <tt>-n</tt> but supports suffixes like 14K.
<codebox title="Sort folder content by size" lang="bash">
du -h --summarize /path/to/target/* | sort -h
</codebox>
0636009bed861c109b7e67bfa657a8967f9e1caa
Ssh/Terminate frozen session
0
1493
2599
2328
2012-01-27T12:45:24Z
EXt
1
wikitext
text/x-wiki
Pressing ~. will terminate the ssh-session.
[[Category:Linux]]
[[Category:ssh]]
4c9c8911e9c4c8bb9af0c687bc0b64408a6693fe
2328
2009-06-03T10:43:58Z
194.47.147.105
0
New page: Pressing ~. will terminate the ssh-session.
wikitext
text/x-wiki
Pressing ~. will terminate the ssh-session.
c69d20ba6fb07b29052b4e00ada7c854cb0f6c99
Subversion/Migrating part of repository
0
1483
2593
2278
2012-01-27T12:19:48Z
EXt
1
wikitext
text/x-wiki
{{Box code||
svnadmin dump '''/part/to/repo''' <nowiki>|</nowiki> svndumpfilter include --drop-empty-revs --renumber-revs '''/repo/part''' <nowiki>|</nowiki> \
sed ''''32,39''' d' <nowiki>|</nowiki> sed 's/Node-path: '''\/repo\/part\/'''/Node-path: /g' <nowiki>|</nowiki> sed 's/Node-copyfrom-path: '''\/repo\/part\/'''/Node-copyfrom-path: /g' > repo.dump
svnadmin create '''/part/to/new/repo'''
svnadmin load --ignore-uuid '''/part/to/new/repo''' < repo.dump
}}
The first sed command (sed '32,39 d') removes the creation of the old folders, most likely you have to change these row numbers.
[[Category:Subversion]]
0b16fe52c812bf9a8f6aa7720677ca33ca40ee27
2278
2277
2008-08-19T17:03:06Z
EXt
1
wikitext
text/x-wiki
{{Box code||
svnadmin dump '''/part/to/repo''' <nowiki>|</nowiki> svndumpfilter include --drop-empty-revs --renumber-revs '''/repo/part''' <nowiki>|</nowiki> \
sed ''''32,39''' d' <nowiki>|</nowiki> sed 's/Node-path: '''\/repo\/part\/'''/Node-path: /g' <nowiki>|</nowiki> sed 's/Node-copyfrom-path: '''\/repo\/part\/'''/Node-copyfrom-path: /g' > repo.dump
svnadmin create '''/part/to/new/repo'''
svnadmin load --ignore-uuid '''/part/to/new/repo''' < repo.dump
}}
The first sed command (sed '32,39 d') removes the creation of the old folders, most likely you have to change these row numbers.
72a60960f9bbb3ebc1164e27ad2e4a3d51214390
2277
2276
2008-08-19T17:02:28Z
EXt
1
wikitext
text/x-wiki
{{Box code||
svnadmin dump '''/part/to/repo''' <nowiki>|</nowiki> svndumpfilter include --drop-empty-revs --renumber-revs '''/repo/part''' <nowiki>|</nowiki> \
sed ''''32,39''' d' <nowiki>|</nowiki> sed 's/Node-path: '''\/repo\/part\/'''/Node-path: /g' <nowiki>|</nowiki> sed 's/Node-copyfrom-path: '''\/repo\/part\/'''/Node-copyfrom-path: /g' > repo.dump
svnadmin create '''/part/to/new/repo'''
svnadmin load --ignore-uuid '''/part/to/new/repo''' < repo.dump
}}
The first sed command removes the creation of the old folders, most likely you have to change these row numbers.
bc6b88ed4584023119aebb479d6a2cbb30be9df3
2276
2008-08-19T17:00:55Z
EXt
1
New page: {{Box code|| svnadmin dump '''/part/to/repo''' <nowiki>|</nowiki> svndumpfilter include --drop-empty-revs --renumber-revs '''/repo/part''' <nowiki>|</nowiki> \ sed ''''32,39''' d' <nowik...
wikitext
text/x-wiki
{{Box code||
svnadmin dump '''/part/to/repo''' <nowiki>|</nowiki> svndumpfilter include --drop-empty-revs --renumber-revs '''/repo/part''' <nowiki>|</nowiki> \
sed ''''32,39''' d' <nowiki>|</nowiki> sed 's/Node-path: '''\/repo\/part\/'''/Node-path: /g' <nowiki>|</nowiki> sed 's/Node-copyfrom-path: '''\/repo\/part\/'''/Node-copyfrom-path: /g' > repo.dump
svnadmin create '''/part/to/new/repo'''
svnadmin load --ignore-uuid '''/part/to/new/repo''' < repo.dump
}}
df65fbbbf1950478ef2c4b3bb97ec90974f23957
Subversion/Migrating to git
0
1826
2950
2949
2013-09-07T17:34:12Z
EXt
1
wikitext
text/x-wiki
<ol>
<li>
Create a file mapping svn users to git users.
<codebox filename="users" lang="text">
user1 = First- Last-name <email1@localhost.localdomain>
user2 = First- Last-name <email2@localhost.localdomain>
...
</codebox>
</li>
<li>Clone svn-repo using git-svn
<pre>
# git svn clone --stdlayout -A users svn://... /path/to/temp/folder
</pre></li>
<li>Verify migration worked correctly</li>
<li>Optional: recreate tags</li>
<li>Optional: <i>svn:ignore</i> can be migrated using <i>show-ignore</i> in the root folder
<pre>git svn show-ignore > .gitignore</pre>
</li>
<li>Add new remote point to new location and push</li>
</ol>
[[Category:Subversion]]
[[Category:Git]]
2089cb41ee26b198b9316aa7a834c30e69d10e11
2949
2013-09-07T17:12:24Z
EXt
1
Created page with "<ol> <li> Create a file mapping svn users to git users. <codebox filename="users" lang="text"> user1 = First- Last-name <email1@localhost.localdomain> user2 = First- Last-name..."
wikitext
text/x-wiki
<ol>
<li>
Create a file mapping svn users to git users.
<codebox filename="users" lang="text">
user1 = First- Last-name <email1@localhost.localdomain>
user2 = First- Last-name <email2@localhost.localdomain>
...
</codebox>
</li>
<li>Clone svn-repo using git-svn
<pre>
# git svn clone --stdlayout -A users svn://... /path/to/temp/folder
</pre></li>
<li>Verify migration worked correctly</li>
<li>Add new remote point to new location and push</li>
</ol>
[[Category:Subversion]]
[[Category:Git]]
a14316fa9a23d26cca8b2b4d7a68e6fefa43b6e1
Subversion/Pre-commit prevent changes to directory
0
1571
2592
2590
2012-01-27T12:19:39Z
EXt
1
wikitext
text/x-wiki
<codebox filename="pre-commit" lang="bash">
#!/bin/sh
set -e
set -o pipefail
REPOS="$1"
TXN="$2"
if svnlook dirs-changed -t "${TXN}" "${REPOS}" | grep "^PATH/TO/BLOCK"; then
echo "Message to display" > 1>&2
exit 1
fi
</codebox>
Put in {{Filename|/path/to/repo/hooks}} and chmod +x
[[Category:Subversion]]
7e8851fc70a75637b2f1192d840a54bb273b92ae
2590
2012-01-25T16:08:36Z
EXt
1
Created page with "<codebox filename="pre-commit" lang="bash"> #!/bin/sh set -e set -o pipefail REPOS="$1" TXN="$2" if svnlook dirs-changed -t "${TXN}" "${REPOS}" | grep "^PATH/TO/BLOCK"; then ..."
wikitext
text/x-wiki
<codebox filename="pre-commit" lang="bash">
#!/bin/sh
set -e
set -o pipefail
REPOS="$1"
TXN="$2"
if svnlook dirs-changed -t "${TXN}" "${REPOS}" | grep "^PATH/TO/BLOCK"; then
echo "Message to display" > 1>&2
exit 1
fi
</codebox>
Put in {{Filename|/path/to/repo/hooks}} and chmod +x
c553a925778190f1e3aebfdb4cd4b264d93f98ac
Teamspeak 3 Nagios
0
1838
3092
3091
2016-06-21T22:06:06Z
EXt
1
/* Assigning privileges */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Using admin identity, add the <tt>nagios</tt> identity to the administrator group.
# Using <tt>nagios</tt> identity, create a <tt>ServerQuery</tt> login.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
error id=0 msg=ok
71fc75c1059cb7d8ff01c630d445af9724ac1983
3091
3090
2016-06-21T21:59:50Z
EXt
1
/* Create identity */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Using admin identity, add the <tt>nagios</tt> identity to the administrator group.
# Using <tt>nagios</tt> identity, create a <tt>ServerQuery</tt> login.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
d1987d0ac312fa3160494da7269529e111329eb0
3090
3089
2016-06-21T21:59:31Z
EXt
1
/* Create identity */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Using admin identity, add the <tt>nagios</tt> identity to the administrator group.
# Using <tt>nagios</tt> identity, create a <tt>ServerQuery login</tt>.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
0da40a6460bc3722e441bbadacb5b1d8dc3f311c
3089
3088
2016-06-21T21:56:05Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Using admin identity, add the <tt>nagios</tt> identity to the administrator group.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
06ef1fc704f295dc92222175593c64ba87b1fd40
3088
3087
2016-06-21T21:52:43Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
# While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
# Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
b71ef5f9f7ce03a23600aa1c7f235028a5439f4a
3087
3086
2016-06-21T21:52:19Z
EXt
1
/* Create identity */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity (Settings -> Identities) with default permissions, preferably named <tt>nagios</tt> or similar.
# Connect to the server using both the new identity and the regular admin identity.
# Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
# While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
# Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
d20b88276076ed06a85f14323292ea6931090d2b
3086
3085
2016-06-21T21:48:08Z
EXt
1
/* Create identity */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Using Teamspeak 3 client, create a new identity (Settings -> Identities) and login to the server.
# Ensure it has default permissions.
# Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
# While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
# Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
86e7076e9626045d4232e6cfc257d639a09bcbb7
3085
3084
2016-06-21T21:44:46Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Create identity ===
# Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
# Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
# Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
# When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
# Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
# While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
# Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
# Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
68b4c77a6696f1a597d6021361632198b4039d25
3084
3083
2016-06-21T21:39:10Z
EXt
1
/* ServerQuery token */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Step 1 ===
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>. Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):
'''login serveradmin password'''
error id=0 msg=ok
'''serverlist'''
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok
The relevant part is <tt>virtualserver_id=1</tt>. Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
'''use sid=1'''
error id=0 msg=ok
'''tokenadd tokentype=0 tokenid1=2 tokenid2=0'''
token=[hidden]
error id=0 msg=ok
Save token for next step.
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
7fa2fd9657c67623260ece11448d87d4741651f4
3083
3082
2016-06-21T21:25:51Z
EXt
1
/* ServerQuery token */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Step 1 ===
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>Save token for next step.
</li>
</ol>
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
1c09b6e03aa13736fd8403812989c980fc6e2a90
3082
3081
2016-06-21T21:24:29Z
EXt
1
/* Assigning privileges */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Step 1 ===
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
'''login nagios password'''
error id=0 msg=ok
'''use sid=1'''
error id=0 msg=ok
'''hostinfo'''
[...]
db9f7ed5af39e6ed72a3d2a206d9910d09a433ec
3081
3080
2016-06-21T21:23:02Z
EXt
1
/* step 3 */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Step 1 ===
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
=== Assigning privileges ===
# Using TS3 client, select the <tt>nagios</tt> identity.
# Use the <tt>ServerQuery</tt> token to grant <tt>ServerAdminQuery Permissions</tt> (Permissions -> Use Privilege key)
# Confirm that you have been granted <tt>ServerAdminQuery Permissions</tt>, you should have a red icon with an (S) next to your name as well <tt>ServerAdminQuery</tt> listed in your Server Groups.
# Create a new group: <tt>Permissions -> Server Group -> Make a new Server Group</tt> using "regular group" template.
# Enter <tt>advanced permissions mode</tt> and assign permissions:
#* ServerQuery: "Retrieve Host- and Instance Info"
# Under <tt>Global -> Administration</tt> and make sure <tt>ServerQuery: Login via ServerQuery</tt> permission is granted
# Add the <tt>nagios</tt> identity to the new group
You can verify that the login is setup properly by running:
login nagios password
error id=0 msg=ok
use sid=1
error id=0 msg=ok
hostinfo
[...]
c67afef42619cb5164961f830d03005cd00d3613
3080
3079
2016-06-21T21:14:09Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
=== Step 1 ===
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
=== step 3 ===
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
759c5c491997db183a5e2864e1b99f6cbd822044
3079
3078
2016-06-20T22:16:29Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
=== ServerQuery token ===
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
cb830cb845b68c99171db93a43cdcfb8bdbd8261
3078
3077
2016-06-20T22:15:48Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery</tt> token for the virtual server (replace <tt>sid=1</tt> with your server id):
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
1a0f42b81ba972e70d1992d0f01ee36e631b5c29
3077
3076
2016-06-20T22:12:53Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 [...]
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery Token</tt>:
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
d798c42ab5f4f76108e36fc81a2d120026cb32ac
3076
3075
2016-06-20T22:12:02Z
EXt
1
/* Creating a ServerQuery login for Nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
<ol>
<li>Connect to <tt>ServerQuery</tt> (default port <tt>10011</tt>) and login using <tt>ServerAdminQuery</tt>.</li>
<li>Use <tt>serverlist</tt> to get your server instance id (usually <tt>1</tt> if only one virtual server is present):<br/>
<pre>login serveradmin password
error id=0 msg=ok
serverlist
virtualserver_id=1 virtualserver_port=9987 virtualserver_status=online virtualserver_clientsonline=0 virtualserver_queryclientsonline=0 virtualserver_maxclients=38 virtualserver_uptime=97 virtualserver_name=Teamspeak3 virtualserver_autostart=1 virtualserver_machine_id
error id=0 msg=ok</pre>The relevant part is <tt>virtualserver_id=1</tt>.</li>
<li>Create a <tt>ServerAdminQuery Token</tt>:
<pre>use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=ok</pre>
</li>Save token for later.
</ol>
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
d90dbf20b9fb126427e2162f4ad9721474556539
3075
3074
2016-06-20T21:38:55Z
EXt
1
/* Creating a ServerQuery login for nagios */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for Nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
6e3583cd8d4dacc59c587e6e5ff6e0baa9bb02db
3074
3073
2016-06-20T21:38:49Z
EXt
1
/* Prerequisites */
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required, including <tt>ServerAdminQuery</tt>)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] Nagios plugin.
== Creating a ServerQuery login for nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
2216508cdba206f8304b2bcd06428fd787882e46
3073
3072
2016-06-20T21:37:06Z
EXt
1
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server (admin access is required)
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] nagios plugin.
== Creating a ServerQuery login for nagios ==
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
5b9659e62b0569b510643d8d4cb38acaa3119971
3072
3071
2016-06-20T21:34:43Z
EXt
1
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
== Prerequisites ==
* Working TS3 server.
* Working Nagios server.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] nagios plugin.
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
8f39cd5fcf2ca060e84ee8cca4b73bf457029daf
3071
3070
2016-06-20T21:34:00Z
EXt
1
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
This guide assumes both Teamspeak and Nagios is already up and running.
* [https://github.com/ext/teamspeak3-nagios check_teamspeak3] nagios plugin.
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
3e8ef4886cb01efc07dfd3d05bd24c30593edd37
3070
3069
2016-06-18T20:45:45Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios. If you want to have it set-up like i have it should look like this: [[Bild]]
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not. [[bild]]
8. Add your identity to the Server Group that you just made with these permissions.
9. Log in with your nagios ServerQuery account that you created in step 1:8
10. Enter the following command:
<codebox>
use sid=[Your Virtual Server ID]
</codebox>
11. Done. Run and enjoy nagios plugin for teamspeak.
6967355090db14d762a02604c4cd6fca6c648bc6
3069
3068
2016-06-18T20:36:28Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
5. Now go to Permissions -> Server Group -> Make a new Server Group using "regular group" template, and name it whatever you want, preferably "nagios" so you can keep track of it.
6. Select the group you just created in the list to your left and then look for the green arrow right next to the red X and press it to enable advanced permissions mode. it looks like this [[Bild]]
7. Select Global -> Information ->
8. Here Give your Server Group the following permissions: ServerQuery: "Retrieve Host- and Instance Info" (right click and select this one and press Add Permission)
This permission is minimum Required, but i like to grant the other permissions in order to get more even information and status from nagios.
7. Next, select Global -> Administration and make sure ServerQuery: Login via ServerQuery permission is granted. This is important since it depends on wheter you can login by telnet with your nagios identity or not.
8.
45b1a7d954cb1a1c92aaa2967f6da8c1b8d2037d
3068
3067
2016-06-18T20:18:19Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
'''Step 1'''
1. Start up your Teamspeak 3 client and create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8. It should look like this [[Bild]]
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally. [[Bild]]
4. When you are connected with your new identity, check and make sure it has the default permissions by checking the info tab to your right, under "Server Groups:"
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), once again confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Go back to your TS3 Client and Select the tab with your second identity
2. have the token generated in step 2 ready
3. Use the token and grant your Nagios Identity (The Second Identity) ServerAdminQuery Permissions (Permissions -> Use Privilegie key)
4. Confirm that you have been granted ServerAdminQuery Permissions, you should have a red icon with an (S) next to your name as well "ServerAdminQuery" listed in your Server Groups. It Should look like this [[Bild]]
7729d04adcf025d56f759088c7d5833a9a0995c5
3067
3066
2016-06-18T20:10:35Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
'''Step 1'''
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:" If you are unsure which of your identities you currently have selected, their name is highlighted in the channel you are in like this: [[bild]]
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
'''STEP 2'''
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
5. Copy your newely generated token and save it for the next step.
'''step 3'''
1. Select the tab with your
85442d6b64b808daebeee838d19c9e9555a724be
3066
3065
2016-06-18T20:05:12Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
<codebox>
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
</codebox>
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
cb04b235252f441042fa9717d196a83aac27ba24
3065
3064
2016-06-18T20:04:31Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
This will create a new ServerAdminQuery Token that you will need to contiune.
If you did everything correctly, your terminal should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
serverlist
virtualserver_id=1
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
c30455351c1d72b36e4a36981ff3e04bf7fb9975
3064
3063
2016-06-18T19:58:58Z
EXt
1
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
This will create a new ServerAdminQuery Token that you will need to contiune.
It should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</codebox>
1e2b3577cdc21d1573b1af218b3adb7daae696a3
3063
3062
2016-06-18T19:58:35Z
EXt
1
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
This will create a new ServerAdminQuery Token that you will need to contiune.
It should look something like this:
<codebox>
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
</code>
c0bd03b0508c59b36d051658205f110aefc374f1
3062
3061
2016-06-18T19:56:48Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4. Now enter the following commands:
use sid=1
tokenadd tokentype=0 tokenid1=2 tokenid2=0
This will create a new ServerAdminQuery Token that you will need to contiune.
It should look something like this:
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
login serveradmin [hidden]
error id=0 msg=ok
use sid=1
error id=0 msg=ok
tokenadd tokentype=0 tokenid1=2 tokenid2=0
token=[hidden]
error id=0 msg=o
79463f9926bc88bbfd1f1df356a0f46c162d20a3
3061
3060
2016-06-18T19:53:00Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember/save the account credentials you make in this step as you will need them for later, So both username and password. have in mind that ServerQuery is case sensitive so i recomend selecting a username with only lowercase letters.
Step 2
1. Connect to your teamspeak3 server by telnet (if you are using windows, easiest way to do this is using PuTTy. Remember to change the port while using telnet as the Default telnet port for teamspeak ServerQuery is 10011)
2. Login as ServerAdminQuery, you should have the login credentials for this saved somewere else already as you got them when you first launched your teamspeak 3 server.
3. When logged in, enter the following command: "Serverlist" to find out ID number of all your Virtual Servers it should look like this: "virtualserver_id=1" where id=1 is the ID for the virtual server. If you have more then one virtual server this number could be diffrent so make sure you know which is which.
4.
b8a2b2a142f23acf8e4e62092e994814869ffe03
3060
3059
2016-06-18T19:37:08Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges by checking the info tab to your right, under "Server Groups:"
8. Keep using the second identity and create yourself a ServerQuerry login (Tools -> ServerQuery Login)
it's IMPORTANT that you remember the account credentials you make in this step as you will need them for later, So both username and password, have in mind that its case sensitive so i recomend selecting a username with only lowercase letters.
b450eab1082aec89b481801c7a57b1bd39bd2e64
3059
3058
2016-06-18T19:31:09Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which, as you are going to use your old one later, the one has the Admin Permissions. So make sure you dont mix those two up for now. The Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4. When you are connected with your new identity, check and make sure it has the default permissions, which in this case should be guest unless you changed it yourself to something else.
5. Now, open up the bookmarks and connections tab again, but this time select your default profile, or the profile that you normally use when you administrate your TS3 server. After this press the Bookmarks tab and hoover over your server bookmark and connect to it by holding your middle mouse button, by doing this you will connect to your TS3 server in another tab and therfore will be connected at the same as your other identity.
6. While using your first identity (the admin one) grant your new and second identity (nagios) admin permissions (right click on the user -> set server group -> Administrator or whatever name the Admin server group has if you changed it.)
7. Swap back to your second identity (nagios), confirm that you have been granted admin privileges
d81f047459e0a3921bdee24e5886b206346e0772
3058
3057
2016-06-18T19:01:36Z
Hawake
64
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
Step 1
1. Start up your Teamspeak 3 client create a new identity (Settings -> Identities)
2. Name it whatever you want, but preferably something like "nagios" so you know which identity is which. Security level shouln't matter, so use the default one which should be 8.
3. Connect to your teamspeak server using your newely created identity (Bookmarks -> Manage bookmarks -> Select your teamspeak 3 server, press the "^More" Button located in the lower left corner to show more connection settings, here look for the "identity" slider and select the identity you just created, in this example nagios. Press "Apply" followed by "Ok" and contiune connecting normally.
4.
066b83ca2480d670bcd52c72966ea8834d28900f
3057
2016-06-18T18:47:17Z
EXt
1
Created page with "Instructions for checking Teamspeak 3 status with nagios."
wikitext
text/x-wiki
Instructions for checking Teamspeak 3 status with nagios.
1a8f4f582bfb42114b430a0b155221978f3a30a0
Thunderbird/Change account order
0
1389
2964
2963
2015-02-02T11:49:15Z
EXt
1
wikitext
text/x-wiki
<metadescription>Changing the order of accounts and identities in thunderbird</metadescription>
<metakeywords>thunderbird, account, identity, order</metakeywords>
The order of accounts and identities cannot be changed without manually reording them in the configuration (using <tt>about:config</tt> or {{Filename|prefs.js}}).
== about:config (recommended) ==
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
Thunderbird stores the order of the accounts in <tt>mail.accountmanager.accounts</tt>. It is a comma-separated list of account designations. By reordering the designations in the list you change the order of the accounts as they appear in thunderbird except for the default account which always appears first.
mail.accountmanager.accounts: account1,account2,account3,account4,account5,account6
mail.accountmanager.defaultaccount: account1
To figure out which account belongs to each designation you can look for <tt>mail.account.account<N>.server</tt> (where N is the number) which contains a server designation:
mail.account.account1.server: server1
Using the server designation you can search for <tt>mail.server.server1</tt> which can be used to figure out what each account is:
mail.server.server1.hostname: example.net
mail.server.server1.name: foo@example.net
mail.server.server1.userName: foo
...
If you want Local Folders to appear first you need to use that as the default account.
== prefs.js ==
* {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux,
* {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and
* {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista, 7 and 8.
{{Box file|prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Follow same instructions as <tt>about:config</tt>.
{{Box note|You must not edit prefs.js while Thunderbird is running!}}
== Identities ==
The order of identities (within an account) can be reordered by modifying <tt>mail.account.account<N>.identities</tt> (and the actual identities can be found at <tt>mail.identity.id<N></tt>)
[[Category:Thunderbird]]
[[Category:Linux]]
ee4cc5b58b8b97ac2414b58e53c347bdeee53015
2963
2958
2015-02-02T11:47:47Z
EXt
1
wikitext
text/x-wiki
The order of accounts and identities cannot be changed without manually reording them in the configuration (using <tt>about:config</tt> or {{Filename|prefs.js}}).
== about:config (recommended) ==
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
Thunderbird stores the order of the accounts in <tt>mail.accountmanager.accounts</tt>. It is a comma-separated list of account designations. By reordering the designations in the list you change the order of the accounts as they appear in thunderbird except for the default account which always appears first.
mail.accountmanager.accounts: account1,account2,account3,account4,account5,account6
mail.accountmanager.defaultaccount: account1
To figure out which account belongs to each designation you can look for <tt>mail.account.account<N>.server</tt> (where N is the number) which contains a server designation:
mail.account.account1.server: server1
Using the server designation you can search for <tt>mail.server.server1</tt> which can be used to figure out what each account is:
mail.server.server1.hostname: example.net
mail.server.server1.name: foo@example.net
mail.server.server1.userName: foo
...
If you want Local Folders to appear first you need to use that as the default account.
== prefs.js ==
* {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux,
* {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and
* {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista, 7 and 8.
{{Box file|prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Follow same instructions as <tt>about:config</tt>.
{{Box note|You must not edit prefs.js while Thunderbird is running!}}
== Identities ==
The order of identities (within an account) can be reordered by modifying <tt>mail.account.account<N>.identities</tt> (and the actual identities can be found at <tt>mail.identity.id<N></tt>)
[[Category:Thunderbird]]
[[Category:Linux]]
de7d505674befd73bcb7aeaa5e2f913022bc95a7
2958
2916
2014-06-02T21:51:56Z
Dean
2601
Added an ordering example for complex Thunderbird configurations
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit:
* {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux,
* {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and
* {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista, 7 and 8.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
You can also do the same edition in thunderbird itself :
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
* search for "account"
* edit the variable "mail.accountmanager.accounts" and change your order here
* quit Thunderbird
* launch Thunderbird, change are now effective
----
'''Dean's take on this:''' The mail.accountmanager.accounts user_pref takes the order of the accounts by their ''Thunderbird'' account designations. You need to figure out which Thunderbird account designations are used for your e-mail accounts before ordering them. Here's a procedure to change the account order in Thunderbird:
# look for the "mail.server.serverN.name" entries in your prefs.js file to establish the relationship between your e-mail accounts and the server designations (server1, server5, server10, etc.) used by Thunderbird:
#* user_pref("mail.server.server1.name", "myaccount1 on myserverA.com"),
#* user_pref("mail.server.server5.name", "myaccount2 on myserverB.com"),
#* user_pref("mail.server.server10.name", "myaccount3 on myserverC.com")
# look for the user_pref("mail.account.accountM.server", "serverN"); entries in prefs.js to establish the relationship between the server designations and their corresponding Thunderbird account designations (e.g. account1, account5, account11):
#* user_pref("mail.account.account1.server", "server1"),
#* user_pref("mail.account.account5.server", "server5"),
#* user_pref("mail.account.account11.server", "server10") (yes, server10 and account11. This happens.)
# to get the accounts to appear in the order myaccount1, myaccount2, myaccount3 in Thunderbird, order the "accounts" in the "mail.accountmanager.accounts" setting thusly: user_pref("mail.accountmanager.accounts", "account1,account5,account11"); Mind bending, no?
I don't think this would be easy to do in the Thunderbird "Config. Editor" as proposed above.
[[Category:Thunderbird]]
[[Category:Linux]]
1a3188b551aea915b2255c54f0f97ac75f618ee4
2916
2606
2013-08-24T16:46:59Z
EXt
1
category
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux, {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista and 7.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
You can also do the same edition in thunderbird itself :
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
* search for "account"
* edit the variable "mail.accountmanager.accounts" and change your order here
* quit thunderbird
* launch thunderbird, change are now effective
[[Category:Thunderbird]]
[[Category:Linux]]
7147a4e098316169678ad50495ab1d4630324b15
2606
2364
2012-01-27T12:49:42Z
EXt
1
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux, {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista and 7.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
You can also do the same edition in thunderbird itself :
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
* search for "account"
* edit the variable "mail.accountmanager.accounts" and change your order here
* quit thunderbird
* launch thunderbird, change are now effective
[[Category:Thunderbird]]
311d7eb44d71c917f774e6cd3b98a5b4c1ab4531
2364
2342
2010-05-11T15:46:50Z
78.155.152.6
0
order procedure via Config editor
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux, {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista and 7.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
You can also do the same edition in thunderbird itself :
* Tools > Options > Tab: Advanced > Tab : General > Config editor : "I'll be careful, I promise!"
* search for "account"
* edit the variable "mail.accountmanager.accounts" and change your order here
* quit thunderbird
* launch thunderbird, change are now effective
e88904128d5b650ff01fbe0ac1c2de9a20d9e445
2342
2336
2009-12-06T20:29:53Z
76.109.240.4
0
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux, {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows XP, and {{Filename|C:\Users\<your profile>\App Data\Roaming\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows Vista and 7.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
145f59f8ba182a810cceb40e91d3890a7661d0ac
2336
2335
2009-10-10T10:32:04Z
EXt
1
Undo revision 2335 by [[Special:Contributions/Rina24|Rina24]] ([[User talk:Rina24|Talk]])
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
fa05c83e62038fb95c4340326294af4054c07404
2335
2283
2009-10-09T14:52:12Z
Rina24
62
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
==EXTERNAL LINKS==
*[http://research-service.com custom papers]
19fb0c962b646af068c00cb9e5c43caf6844c002
2283
2282
2008-09-01T11:02:50Z
213.61.225.194
0
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately; you can only have these identities together in a different position.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
fa05c83e62038fb95c4340326294af4054c07404
2282
2279
2008-09-01T11:01:02Z
213.61.225.194
0
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
You find the identities when you look for "mail.identity.id<n>.useremail" and the relation between identities and accounts looking for "mail.account.account<n>.identities". If you have several identities for an account, you can't influence the order of these or order them separately.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
9f7038af6feefa8f22971217d40a966723c8c567
2279
2133
2008-08-25T10:35:42Z
EXt
1
[[Thunderbird: Change account order]] moved to [[Thunderbird/Change account order]]: Consistence
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
db2aa8a661850e9e0d55ef0c8ec6a2988e1acdc5
2133
2129
2007-10-25T09:51:33Z
138.38.18.117
0
wikitext
text/x-wiki
To change the order of the accounts in Thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to appear first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
db2aa8a661850e9e0d55ef0c8ec6a2988e1acdc5
2129
2128
2007-06-28T14:39:18Z
Echav
12
wikitext
text/x-wiki
To change the order of the accounts in thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
12e0b19bcb03fcee6b02350d18f917c5b16a7448
2128
2127
2007-04-14T12:19:47Z
EXt
1
wikitext
text/x-wiki
To change the order of the accounts in thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{Filename|C:\Documents and Settings\Profile\Application Data\Thunderbird\Profiles\****.default\prefs.js}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
986d48f65aae39d1bff0e53ee071b9bbcd0b2229
2127
2120
2007-04-10T17:18:18Z
Echav
12
wikitext
text/x-wiki
To change the order of the accounts in thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and C:\Documents and Settings\Profile\Application Data\Thunderbird\Profiles\****.default\prefs.js in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
fdf289c0aad0de1ff314b99504a1fbbc1e65cf21
2120
1951
2007-02-19T01:20:13Z
EXt
1
wikitext
text/x-wiki
To change the order of the accounts in thunderbird simply edit {{Filename|~/.thunderbird/<your profile>/prefs.js}} in GNU/Linux and {{ATTN|Windows file?}} in Microsoft Windows.
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
3f291c7b1afbee2fa9779cd943aa5904bb09db27
1951
1950
2006-07-15T11:37:11Z
EXt
1
wikitext
text/x-wiki
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit prefs.js while Thunderbird is running!}}
524c6ed0cea92ae58771829cd97928765fb6138b
1950
1949
2006-07-15T10:59:02Z
EXt
1
wikitext
text/x-wiki
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit {{filename|prefs.js}} while Thunderbird is running!}}
230d2bb54b6729d45ecff17f1e5d7bce6bc648f2
1949
1946
2006-07-15T10:48:33Z
EXt
1
wikitext
text/x-wiki
{{Box file|~/.thunderbird/<your profile>/prefs.js|
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
{{Box note|You should not edit {{file|prefs.js}} while Thunderbird is running!}}
c29fc2cbef0af622c9ff1522dd5f986eab36bdf0
1946
2006-07-15T10:45:50Z
EXt
1
wikitext
text/x-wiki
{{Box file|~/.thunderbird/<your profile>/prefs.js
user_pref("mail.accountmanager.accounts", "account5,account3,account2,account4,account1,account7");
user_pref("mail.accountmanager.defaultaccount", "account5");
}}
Edit those two lines to change the order of the accounts. The default account is always first. Simply swap the order of the other accounts. If you want Local Folders to apperar first you need to use that as the default account.
bad79dc9a5de3b938cccf4586e735e4e3969a8a3
Thunderbird/Encrypting your email
0
1450
2917
2605
2013-08-24T16:47:35Z
EXt
1
category
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Key pairs ==
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you and verify that the message was sent by you. The private key is needed to decrypt the messages. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. While the public and private key has a strong relation one cannot be used to generate the other. If you are interested in learning more about how this works read [http://en.wikipedia.org/wiki/Public-key_cryptography Public-key_cryptography] on [http://en.wikipedia.org/wiki/Main_Page Wikipedia]. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
[[Image:Screenshot-OpenPGP Key Management.png|thumb|Key Management]]
To generate a key pair go to the key management under the new menu OpenPGP (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions. Basically you have to enter a passphrase, most other settings is good enough already. I recommend that you use a strong passphrase for your keys even if this means that you have to enter it each time you send a message. This will make it more secure in case the private the is compromised.
It might also be a good idea to upload your public key to a keyserver by first selecting your key in the list then select 'keyserver' in key management and chose 'Upload public key'. You may also choose to create more than one key pair and use per-recipient rules on which key to use when sending. For instance you can use one pair normally and another pair when you want to be extra secure.
== Sending messages ==
After writing you message as usual select 'Sign message' and 'Encrypt message' under the OpenPGP menu. Depending on you settings these might already be selected. When you hit send Enigmail checks if the you have the receivers public key and if not it will open the key management and ask you to import the key, either from a keyserver or from a file. After selecting the key you need to enter your passphrase and then the message is sent.
== Image tutorial ==
<gallery perRow="3">
Image:Enigmail-01.png|Starting with a fresh installation.
Image:Enigmail-02.png|Default Thunderbird new user wizard.
Image:Enigmail-03.png|Add a new email account.
Image:Enigmail-04.png|Enter name and adress.
Image:Enigmail-05.png|Server addresses.
Image:Enigmail-06.png|Usernames.
Image:Enigmail-07.png|Account name.
Image:Enigmail-08.png|And summary, now for the real tutorial.
Image:Enigmail-09.png|Now enter the Key Management to create the key pair.
Image:Enigmail-10.png|Enigmail wizard.
Image:Enigmail-11.png|I want to sign all my messages per default.
Image:Enigmail-12.png|I also want to encrypt all my messages per default, but you might chose not to.
Image:Enigmail-13.png|Let Enigmail changes these settings.
Image:Enigmail-14.png|Enter your passphrase.
Image:Enigmail-15.png|Summary.
Image:Enigmail-16.png|Generating keys.
Image:Enigmail-17.png|Key generation finished.
Image:Enigmail-18.png|Composing a test mail.
Image:Enigmail-19.png|Make sure 'Encrypt message' is selected.
Image:Enigmail-20.png|When you try to send the mail for the first time the recipients public key is not found.
Image:Enigmail-21.png|Choose to import the key (need to know which keyserver).
Image:Enigmail-22.png|List of found keys.
Image:Enigmail-23.png|Public key imported.
Image:Enigmail-24.png|Need to check the new key, then press 'ok'
Image:Enigmail-25.png|As you can see your message has now been encrypted.
Image:Enigmail-26.png|To upload your public key to the keyserver go back to this dialog.
Image:Enigmail-27.png|Select '''your''' public key and choose 'Upload Public keys'.
Image:Enigmail-28.png|Select which keyserver to upload to.
</gallery>
[[Category:Thunderbird]]
[[Category:Linux]]
866aca4b2c0c5d38629dc5c257e3bfe79ccfcfc0
2605
2265
2012-01-27T12:49:34Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Key pairs ==
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you and verify that the message was sent by you. The private key is needed to decrypt the messages. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. While the public and private key has a strong relation one cannot be used to generate the other. If you are interested in learning more about how this works read [http://en.wikipedia.org/wiki/Public-key_cryptography Public-key_cryptography] on [http://en.wikipedia.org/wiki/Main_Page Wikipedia]. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
[[Image:Screenshot-OpenPGP Key Management.png|thumb|Key Management]]
To generate a key pair go to the key management under the new menu OpenPGP (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions. Basically you have to enter a passphrase, most other settings is good enough already. I recommend that you use a strong passphrase for your keys even if this means that you have to enter it each time you send a message. This will make it more secure in case the private the is compromised.
It might also be a good idea to upload your public key to a keyserver by first selecting your key in the list then select 'keyserver' in key management and chose 'Upload public key'. You may also choose to create more than one key pair and use per-recipient rules on which key to use when sending. For instance you can use one pair normally and another pair when you want to be extra secure.
== Sending messages ==
After writing you message as usual select 'Sign message' and 'Encrypt message' under the OpenPGP menu. Depending on you settings these might already be selected. When you hit send Enigmail checks if the you have the receivers public key and if not it will open the key management and ask you to import the key, either from a keyserver or from a file. After selecting the key you need to enter your passphrase and then the message is sent.
== Image tutorial ==
<gallery perRow="3">
Image:Enigmail-01.png|Starting with a fresh installation.
Image:Enigmail-02.png|Default Thunderbird new user wizard.
Image:Enigmail-03.png|Add a new email account.
Image:Enigmail-04.png|Enter name and adress.
Image:Enigmail-05.png|Server addresses.
Image:Enigmail-06.png|Usernames.
Image:Enigmail-07.png|Account name.
Image:Enigmail-08.png|And summary, now for the real tutorial.
Image:Enigmail-09.png|Now enter the Key Management to create the key pair.
Image:Enigmail-10.png|Enigmail wizard.
Image:Enigmail-11.png|I want to sign all my messages per default.
Image:Enigmail-12.png|I also want to encrypt all my messages per default, but you might chose not to.
Image:Enigmail-13.png|Let Enigmail changes these settings.
Image:Enigmail-14.png|Enter your passphrase.
Image:Enigmail-15.png|Summary.
Image:Enigmail-16.png|Generating keys.
Image:Enigmail-17.png|Key generation finished.
Image:Enigmail-18.png|Composing a test mail.
Image:Enigmail-19.png|Make sure 'Encrypt message' is selected.
Image:Enigmail-20.png|When you try to send the mail for the first time the recipients public key is not found.
Image:Enigmail-21.png|Choose to import the key (need to know which keyserver).
Image:Enigmail-22.png|List of found keys.
Image:Enigmail-23.png|Public key imported.
Image:Enigmail-24.png|Need to check the new key, then press 'ok'
Image:Enigmail-25.png|As you can see your message has now been encrypted.
Image:Enigmail-26.png|To upload your public key to the keyserver go back to this dialog.
Image:Enigmail-27.png|Select '''your''' public key and choose 'Upload Public keys'.
Image:Enigmail-28.png|Select which keyserver to upload to.
</gallery>
[[Category:Thunderbird]]
b26798f98e331baa02553d63b6c04fdbaaa4b3d8
2265
2236
2008-06-17T12:40:03Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Key pairs ==
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you and verify that the message was sent by you. The private key is needed to decrypt the messages. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. While the public and private key has a strong relation one cannot be used to generate the other. If you are interested in learning more about how this works read [http://en.wikipedia.org/wiki/Public-key_cryptography Public-key_cryptography] on [http://en.wikipedia.org/wiki/Main_Page Wikipedia]. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
[[Image:Screenshot-OpenPGP Key Management.png|thumb|Key Management]]
To generate a key pair go to the key management under the new menu OpenPGP (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions. Basically you have to enter a passphrase, most other settings is good enough already. I recommend that you use a strong passphrase for your keys even if this means that you have to enter it each time you send a message. This will make it more secure in case the private the is compromised.
It might also be a good idea to upload your public key to a keyserver by first selecting your key in the list then select 'keyserver' in key management and chose 'Upload public key'. You may also choose to create more than one key pair and use per-recipient rules on which key to use when sending. For instance you can use one pair normally and another pair when you want to be extra secure.
== Sending messages ==
After writing you message as usual select 'Sign message' and 'Encrypt message' under the OpenPGP menu. Depending on you settings these might already be selected. When you hit send Enigmail checks if the you have the receivers public key and if not it will open the key management and ask you to import the key, either from a keyserver or from a file. After selecting the key you need to enter your passphrase and then the message is sent.
== Image tutorial ==
<gallery perRow="3">
Image:Enigmail-01.png|Starting with a fresh installation.
Image:Enigmail-02.png|Default Thunderbird new user wizard.
Image:Enigmail-03.png|Add a new email account.
Image:Enigmail-04.png|Enter name and adress.
Image:Enigmail-05.png|Server addresses.
Image:Enigmail-06.png|Usernames.
Image:Enigmail-07.png|Account name.
Image:Enigmail-08.png|And summary, now for the real tutorial.
Image:Enigmail-09.png|Now enter the Key Management to create the key pair.
Image:Enigmail-10.png|Enigmail wizard.
Image:Enigmail-11.png|I want to sign all my messages per default.
Image:Enigmail-12.png|I also want to encrypt all my messages per default, but you might chose not to.
Image:Enigmail-13.png|Let Enigmail changes these settings.
Image:Enigmail-14.png|Enter your passphrase.
Image:Enigmail-15.png|Summary.
Image:Enigmail-16.png|Generating keys.
Image:Enigmail-17.png|Key generation finished.
Image:Enigmail-18.png|Composing a test mail.
Image:Enigmail-19.png|Make sure 'Encrypt message' is selected.
Image:Enigmail-20.png|When you try to send the mail for the first time the recipients public key is not found.
Image:Enigmail-21.png|Choose to import the key (need to know which keyserver).
Image:Enigmail-22.png|List of found keys.
Image:Enigmail-23.png|Public key imported.
Image:Enigmail-24.png|Need to check the new key, then press 'ok'
Image:Enigmail-25.png|As you can see your message has now been encrypted.
Image:Enigmail-26.png|To upload your public key to the keyserver go back to this dialog.
Image:Enigmail-27.png|Select '''your''' public key and choose 'Upload Public keys'.
Image:Enigmail-28.png|Select which keyserver to upload to.
</gallery>
f99bf03cec2e7bf0c6fe026e5c12bc507345eeaf
2236
2233
2008-06-17T11:42:27Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Key pairs ==
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you and verify that the message was sent by you. The private key is needed to decrypt the messages. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. While the public and private key has a strong relation one cannot be used to generate the other. If you are interested in learning more about how this works read [http://en.wikipedia.org/wiki/Public-key_cryptography Public-key_cryptography] on [http://en.wikipedia.org/wiki/Main_Page Wikipedia]. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
[[Image:Screenshot-OpenPGP Key Management.png|thumb|Key Management]]
To generate a key pair go to the key management under the new menu OpenPGP (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions. Basically you have to enter a passphrase, most other settings is good enough already. I recommend that you use a strong passphrase for your keys even if this means that you have to enter it each time you send a message. This will make it more secure in case the private the is compromised.
It might also be a good idea to upload your public key to a keyserver by first selecting your key in the list then select 'keyserver' in key management and chose 'Upload public key'. You may also choose to create more than one key pair and use per-recipient rules on which key to use when sending. For instance you can use one pair normally and another pair when you want to be extra secure.
== Sending messages ==
After writing you message as usual select 'Sign message' and 'Encrypt message' under the OpenPGP menu. Depending on you settings these might already be selected. When you hit send Enigmail checks if the you have the receivers public key and if not it will open the key management and ask you to import the key, either from a keyserver or from a file. After selecting the key you need to enter your passphrase and then the message is sent.
cd562da5d61473817a1e108a48af0bfea56725b1
2233
2232
2008-06-17T11:25:29Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Key pairs ==
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you. The private key is needed to decrypt the message. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
To generate a key pair go to the key management under the new menu OpenPGP (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions. I recommend that you use a passphrase for your keys even if this means that you have to enter it each time you send a message. This will make it more secure in case the private the is compromised.
To upload your public key first select your key in the list then select 'keyserver' in key management and chose 'Upload public key'.
== Sending messages ==
After writing you message as usual select 'Sign message' and 'Encrypt message' under the OpenPGP menu. Depending on you settings these might already be selected. When you hit send Enigmail checks if the you have the receivers public key and if not it will open the key management and ask you to import the key, either from a keyserver or from a file. After selecting the key you need to enter your passphrase and then the message is sent.
1699952ae5af0e07f534cd4b5fc410d49b48fd20
2232
2231
2008-06-17T11:16:40Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. By using Enigmail/GnuPG you can also sign messages so the receiver can verify that you are the original sender and that it is not forged. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Configure Enigmail ==
=== Key pairs ===
GnuPG uses two pair of keys, a public and private. The public key is used by others to encrypting their messages to you. The private key is needed to decrypt the message. You need to distribute the public key to anyone who want to send messages to you, either by giving it to them manually or by uploading it to a keyserver. A keyserver is a database of public keys associated with an email adress. EnigMail allows you to specify how much you trust a key. Keep your private key secure! If your private key is compromised others may decrypt your messages and sign messages under your identity.
To generate a key pair go to the key management (this pops up the first time you start Thunderbird with Enigmail) and follow the instructions.
e80f300367394879ad8b473634effb74d697c74e
2231
2230
2008-06-17T10:52:55Z
EXt
1
wikitext
text/x-wiki
== Overview ==
To encrypt the email we use the common add-on [http://enigmail.mozdev.org/home/index.php Enigmail] which uses [http://www.gnupg.org/ GnuPG], an implementation of OpenPGP. First we need to install Thunderbird (if not installed already), Enigmail and GnuPG.
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
== Configure Enigmail ==
6968dcfa3a7addf8c2ad605361cbbafedb09df53
2230
2229
2008-06-17T10:42:45Z
EXt
1
wikitext
text/x-wiki
== Overview ==
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Also, Enigmail requires the application [http://www.gnupg.org/ GnuPG] to run which must also be installed manually. From site select download and find a binary version to download, current version is: [ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe gnupg-w32cli-1.4.9.exe]. Don't be scared if this site looks confusing.
After installing GnuPG go back to Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
a21a8885c09ee6675d247e0ec33b302882109bd2
2229
2228
2008-06-17T10:35:20Z
EXt
1
wikitext
text/x-wiki
== Overview ==
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install IceDove (Thunderbird rebranded due to legal issues) and Enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows/Other ===
Windows users and distributions without package managers need to download and install [http://www.mozilla.com/en-US/thunderbird/ Thunderbird] manually. Enigmail must also be installed manually and can be downloaded from [https://addons.mozilla.org https://addons.mozilla.org], first select Thunderbird under 'Other applications', search for enigmail and download it. If you are using Firefox you need to make sure you download it and not try to install it directly. Now in Thunderbird, select 'Tools' -> 'Add-ons', click 'Install' and select Enigmail from where you previously downloaded it. After installing you need to restart Thunderbird.
23d2e0acfcd4341182cedbcdcf42fe4022d4127e
2228
2008-06-17T10:19:48Z
EXt
1
New page: == Overview == === Gentoo Linux === Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail a...
wikitext
text/x-wiki
== Overview ==
=== Gentoo Linux ===
Gentoo users just emerge the package mail-client/mozilla-thunderbird with the useflag crypt enabled, this will pull the package x11-plugins/enigmail and it's dependencies.
{{Box code||
# emerge -av mozilla-thunderbird enigmail
}}
=== Debian/Ubuntu Linux ===
Debian-based distributions need to install icedove (thunderbird rebranded due to legal issues) and enigmail. This will also pull all the dependencies.
{{Box code|Any package manager frontend will do it, but here is the cli version|
# apt-get install icedove enigmail
}}
=== Windows ===
8ce4cf2258770950da27b8ac70be4cd41d4d4ccf
Thunderbird: Change account order
0
1484
2280
2008-08-25T10:35:42Z
EXt
1
[[Thunderbird: Change account order]] moved to [[Thunderbird/Change account order]]: Consistence
wikitext
text/x-wiki
#REDIRECT [[Thunderbird/Change account order]]
484e2133d2b87142350133fa3982296401fa053f
Tmpfs
0
1580
2623
2012-01-27T13:01:00Z
EXt
1
moved [[Tmpfs]] to [[Mount tmpfs]]
wikitext
text/x-wiki
#REDIRECT [[Mount tmpfs]]
3a420b2add103c270c9bfa9b47db0dd95a180838
Ubuntu/Version
0
1605
2692
2012-04-18T09:07:14Z
EXt
1
Created page with " % lsb_release -d -s -c Ubuntu 11.10 oneiric [[Category:Linux]]"
wikitext
text/x-wiki
% lsb_release -d -s -c
Ubuntu 11.10
oneiric
[[Category:Linux]]
6cfe16e91a20ca9fba82f87c706349926b8d93a8
Unittest replacement function in library
0
1588
2672
2671
2012-03-16T00:07:54Z
EXt
1
wikitext
text/x-wiki
Suppose that you need to implement a replacement function, for instance <tt>be64toh</tt> which was added in glibc-2.9, to remain compatible with legacy system. Ofcourse you want to use the real function if available.
== Function implementation ==
The replacement is called _int_be64toh and the header conditionally [[GCC/Function alias|aliases]] be64toh to _int_be64toh. This way it is possible to compile on any system without any interference. It might be a good idea to adjust the visibility of the function as well.
<codebox filename="be64toh.h" lang="c">
#ifndef __WORKAROUND_BE64TOH_H
#define __WORKAROUND_BE64TOH_H
#include <stdint.h>
#ifdef HAVE_BE64TOH
#include <endian.h>
#else
uint64_t be64toh(uint64_t val) __attribute__((weakref("_int_be64toh")));
#endif /* HAVE_BE64TOH */
#endif /* __WORKAROUND_BE64TOH_H */
</codebox>
<codebox filename="be64toh.c" lang="c">
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "be64toh.h"
#include <arpa/inet.h>
union bits {
uint32_t v[2];
uint64_t d;
};
uint64_t _int_be64toh(uint64_t big_endian_64bits){
union bits out, in = { .d = big_endian_64bits };
out.v[1] = ntohl(in.v[0]);
out.v[0] = ntohl(in.v[1]);
return out.d;
}
</codebox>
== Conditional compilation ==
(Not showing the configure test, it varies too much depending on context)
<codebox filename="Makefile.am" lang="text">
if BUILD_BE64TOH
libfoo_la_SOURCES += be64toh.c be64toh.h
endif
tests_bar_CFLAGS = ${AM_CFLAGS} -Dfulhack
tests_bar_LDADD = libfoo.la
tests_bar_SOURCES = tests/bar.c be64toh.c
</codebox>
<tt>-Dfulhack</tt> (or anything similar) is needed or you get
Makefile.am: object `be64toh.$(OBJEXT)' created both with libtool and without
== Unittest ==
Now you can use _int_be64toh in you unittests (if you want to compare the result with the system implementation, which is a good idea, you can only run the test if HAVE_BE64TOH is defined.)
[[Category: unittest]]
[[Category: linux-dev]]
[[Category: autotools]]
7bbd787a1ceffb47344dbf54db5e21c2c1615ca4
2671
2660
2012-03-16T00:07:44Z
EXt
1
wikitext
text/x-wiki
Suppose that you need to implement a replacement function, for instance <tt>be64toh</tt> which was added in glibc-2.9, to remain compatible with legacy system. Ofcourse you want to use the real function if available.
== Function implementation ==
The replacement is called _int_be64toh and the header conditionally [[GCC/Function alias|aliases]] be64toh to _int_be64toh. This way it is possible to compile on any system without any interference. It might be a good idea to adjust the visibility of the function as well.
<codebox filename="be64toh.h" lang="c">
#ifndef __WORKAROUND_BE64TOH_H
#define __WORKAROUND_BE64TOH_H
#include <stdint.h>
#ifdef HAVE_BE64TOH
#include <endian.h>
#else
uint64_t be64toh(uint64_t val) __attribute__((weakref"_int_be64toh")));
#endif /* HAVE_BE64TOH */
#endif /* __WORKAROUND_BE64TOH_H */
</codebox>
<codebox filename="be64toh.c" lang="c">
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "be64toh.h"
#include <arpa/inet.h>
union bits {
uint32_t v[2];
uint64_t d;
};
uint64_t _int_be64toh(uint64_t big_endian_64bits){
union bits out, in = { .d = big_endian_64bits };
out.v[1] = ntohl(in.v[0]);
out.v[0] = ntohl(in.v[1]);
return out.d;
}
</codebox>
== Conditional compilation ==
(Not showing the configure test, it varies too much depending on context)
<codebox filename="Makefile.am" lang="text">
if BUILD_BE64TOH
libfoo_la_SOURCES += be64toh.c be64toh.h
endif
tests_bar_CFLAGS = ${AM_CFLAGS} -Dfulhack
tests_bar_LDADD = libfoo.la
tests_bar_SOURCES = tests/bar.c be64toh.c
</codebox>
<tt>-Dfulhack</tt> (or anything similar) is needed or you get
Makefile.am: object `be64toh.$(OBJEXT)' created both with libtool and without
== Unittest ==
Now you can use _int_be64toh in you unittests (if you want to compare the result with the system implementation, which is a good idea, you can only run the test if HAVE_BE64TOH is defined.)
[[Category: unittest]]
[[Category: linux-dev]]
[[Category: autotools]]
ef2f7c15a61e70bfb83bab9d47651b44829a5e29
2660
2659
2012-02-06T17:21:12Z
EXt
1
wikitext
text/x-wiki
Suppose that you need to implement a replacement function, for instance <tt>be64toh</tt> which was added in glibc-2.9, to remain compatible with legacy system. Ofcourse you want to use the real function if available.
== Function implementation ==
The replacement is called _int_be64toh and the header conditionally [[GCC/Function alias|aliases]] be64toh to _int_be64toh. This way it is possible to compile on any system without any interference. It might be a good idea to adjust the visibility of the function as well.
<codebox filename="be64toh.h" lang="c">
#ifndef __WORKAROUND_BE64TOH_H
#define __WORKAROUND_BE64TOH_H
#include <stdint.h>
#ifdef HAVE_BE64TOH
#include <endian.h>
#else
uint64_t be64toh(uint64_t val) __attribute__((weak, alias ("_int_be64toh")));
#endif /* HAVE_BE64TOH */
#endif /* __WORKAROUND_BE64TOH_H */
</codebox>
<codebox filename="be64toh.c" lang="c">
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "be64toh.h"
#include <arpa/inet.h>
union bits {
uint32_t v[2];
uint64_t d;
};
uint64_t _int_be64toh(uint64_t big_endian_64bits){
union bits out, in = { .d = big_endian_64bits };
out.v[1] = ntohl(in.v[0]);
out.v[0] = ntohl(in.v[1]);
return out.d;
}
</codebox>
== Conditional compilation ==
(Not showing the configure test, it varies too much depending on context)
<codebox filename="Makefile.am" lang="text">
if BUILD_BE64TOH
libfoo_la_SOURCES += be64toh.c be64toh.h
endif
tests_bar_CFLAGS = ${AM_CFLAGS} -Dfulhack
tests_bar_LDADD = libfoo.la
tests_bar_SOURCES = tests/bar.c be64toh.c
</codebox>
<tt>-Dfulhack</tt> (or anything similar) is needed or you get
Makefile.am: object `be64toh.$(OBJEXT)' created both with libtool and without
== Unittest ==
Now you can use _int_be64toh in you unittests (if you want to compare the result with the system implementation, which is a good idea, you can only run the test if HAVE_BE64TOH is defined.)
[[Category: unittest]]
[[Category: linux-dev]]
[[Category: autotools]]
b183c8e07a6d42310b0754c72c9e6273707425e6
2659
2012-02-06T17:20:42Z
EXt
1
Created page with "Suppose that you need to implement a replacement function, for instance <tt>be64toh</tt> which was added in glibc-2.9, to remain compatible with legacy system. Ofcourse you want ..."
wikitext
text/x-wiki
Suppose that you need to implement a replacement function, for instance <tt>be64toh</tt> which was added in glibc-2.9, to remain compatible with legacy system. Ofcourse you want to use the real function if available.
== Function implementation ==
The replacement is called _int_be64toh and the header conditionally [[GCC/Function alias|aliases]] be64toh to _int_be64toh. This way it is possible to compile on any system without any interference.
<codebox filename="be64toh.h" lang="c">
#ifndef __WORKAROUND_BE64TOH_H
#define __WORKAROUND_BE64TOH_H
#include <stdint.h>
#ifdef HAVE_BE64TOH
#include <endian.h>
#else
uint64_t be64toh(uint64_t val) __attribute__((weak, alias ("_int_be64toh")));
#endif /* HAVE_BE64TOH */
#endif /* __WORKAROUND_BE64TOH_H */
</codebox>
<codebox filename="be64toh.c" lang="c">
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "be64toh.h"
#include <arpa/inet.h>
union bits {
uint32_t v[2];
uint64_t d;
};
uint64_t _int_be64toh(uint64_t big_endian_64bits){
union bits out, in = { .d = big_endian_64bits };
out.v[1] = ntohl(in.v[0]);
out.v[0] = ntohl(in.v[1]);
return out.d;
}
</codebox>
== Conditional compilation ==
(Not showing the configure test, it varies too much depending on context)
<codebox filename="Makefile.am" lang="text">
if BUILD_BE64TOH
libfoo_la_SOURCES += be64toh.c be64toh.h
endif
tests_bar_CFLAGS = ${AM_CFLAGS} -Dfulhack
tests_bar_LDADD = libfoo.la
tests_bar_SOURCES = tests/bar.c be64toh.c
</codebox>
<tt>-Dfulhack</tt> (or anything similar) is needed or you get
Makefile.am: object `be64toh.$(OBJEXT)' created both with libtool and without
== Unittest ==
Now you can use _int_be64toh in you unittests (if you want to compare the result with the system implementation, which is a good idea, you can only run the test if HAVE_BE64TOH is defined.)
[[Category: unittest]]
[[Category: linux-dev]]
[[Category: autotools]]
950fc5bbb685dac512c68500ef444613fa04f550
VLAN
0
1673
2774
2013-06-20T11:17:56Z
EXt
1
Created page with "== Prerequisites == === Gentoo === modprobe 8021q emerge -av net-misc/vconfig === Debian/Ubuntu === modprobe 8021q apt-get install vlan == Configuration == === M..."
wikitext
text/x-wiki
== Prerequisites ==
=== Gentoo ===
modprobe 8021q
emerge -av net-misc/vconfig
=== Debian/Ubuntu ===
modprobe 8021q
apt-get install vlan
== Configuration ==
=== Manual ===
vconfig add eth0 2
ifconfig eth0.2 10.0.2.1/24
where 2 is the VID.
=== Gentoo ===
<codebox filename="/etc/conf.d/net" lang="text">
vlans_eth0="1 2"
config_vlan1="10.0.1.1 netmask 255.255.255.0"
config_vlan2="10.0.2.1 netmask 255.255.255.0"
</codebox>
=== Debian/Ubuntu ===
<codebox filename="/etc/network/interfaces" lang="text">
auto eth0.1
iface eth0.1 inet static
address 10.0.1.1
netmask 255.255.255.0
vlan-raw-device eth0
auto eth0.2
iface eth0.2 inet static
address 10.0.2.1
netmask 255.255.255.0
vlan-raw-device eth0
</codebox>
[[Category:Linux]]
[[Category:Networking]]
d75c3002e0bc00c5ac8878876d8fe39f63f5be5c
VirtualBox/Raw dd image
0
1603
2690
2012-04-16T21:38:53Z
EXt
1
Created page with " VBoxManage convertfromraw src.iso dst.vdi [[Category:Linux]]"
wikitext
text/x-wiki
VBoxManage convertfromraw src.iso dst.vdi
[[Category:Linux]]
0296da121cad03d9d893c334bef6fec5d90e168b
Windows/Share Putty key with Cygwin
0
1659
2758
2757
2013-05-15T18:21:10Z
EXt
1
wikitext
text/x-wiki
Simple guide for sharing the same keypair in putty and cygwin (openssh).
<gallery>
File:Sharekey01.png|Starting fresh
File:Sharekey02.png|Start by running puttygen.exe (not bundled with putty, must be downloaded separately)
File:Sharekey03.png|Press "generate" to start.
File:Sharekey04.png|Type in the machine name.
File:Sharekey05.png|Export the (private) key in a format OpenSSH understands.
File:Sharekey06.png|Save the file in C:\cygwin\home\USER\.ssh\id_rsa
File:Sharekey07.png|Copy the public key (the select text in the image)
File:Sharekey08.png|Paste it in a text editor.
File:Sharekey09.png|Optionally change the line-ending to UNIX format.
File:Sharekey10.png|Save the file in C:\cygwin\home\USER\.ssh\id_rsa.pub
File:Sharekey11.png|Validate fingerprint.
File:Sharekey12.png|Export private key in PPK format.
</gallery>
[[Category:Windows]]
[[Category:Cygwin]]
[[Category:Putty]]
88ccf99a3b84090d5229bb9779ddb2d2e86bb32a
2757
2013-05-15T18:12:17Z
EXt
1
Created page with "<gallery> File:Sharekey01.png|Starting fresh File:Sharekey02.png|Start by running puttygen.exe (not bundled with putty, must be downloaded separately) File:Sharekey03.png|Pres..."
wikitext
text/x-wiki
<gallery>
File:Sharekey01.png|Starting fresh
File:Sharekey02.png|Start by running puttygen.exe (not bundled with putty, must be downloaded separately)
File:Sharekey03.png|Press "generate" to start.
File:Sharekey04.png|Type in the machine name.
File:Sharekey05.png|Export the (private) key in a format OpenSSH understands.
File:Sharekey06.png|Save the file in C:\cygwin\home\USER\.ssh\id_rsa
File:Sharekey07.png|Copy the public key (the select text in the image)
File:Sharekey08.png|Paste it in a text editor.
File:Sharekey09.png|Optionally change the line-ending to UNIX format.
File:Sharekey10.png|Save the file in C:\cygwin\home\USER\.ssh\id_rsa.pub
File:Sharekey11.png|Validate fingerprint.
File:Sharekey12.png|Export private key in PPK format.
</gallery>
c7e0582e14d4d224b373c99b4aa9ccaa8ec2b7e4
Working with disk images
0
1827
2955
2954
2013-09-15T01:00:18Z
EXt
1
wikitext
text/x-wiki
== Creating disk image with partition-table from scratch ==
A sparse image can be created using dd:
# dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0
Create partition-table and partitions:
# fdisk /PATH/TO/IMAGE
To create filsystems use kpartx (see below regarding mounting) to setup loopback devices for the partitions. It is possible using losetup but it requires passing the size to mkfs and is generally much more difficult.
== Mounting disk image with partition-table ==
=== Using kpartx ===
kpartx is part of multipath-tools.
# kpartx -av /PATH/TO/IMAGE
add map loop0p1 (253:8): 0 204800 linear /dev/loop0 2048
add map loop0p2 (253:9): 0 20273152 linear /dev/loop0 206848
Partitions can now be accessed using /dev/mapper/loop0p1 etc.
# mount /dev/mapper/loop0p1 /mnt/...
Detatching devices.
# kpartx -dv /PATH/TO/IMAGE
=== Using losetup manually ===
# losetup -f
/dev/loopN
# losetup -o $((512*SECTOR)) /dev/loopN /PATH/TO/IMAGE
# mount /dev/loopN /mnt/...
== Cloning disk ==
(adapt blocksize to fit drive)
# fdisk -l > /PATH/TO/IMAGE.fdisk
# dd if=/dev/DISK of=/PATH/TO/IMAGE bs=4096 conv=noerror,sync
=== Over network ===
On receiver
# nc -l -p 4711 | dd of=/PATH/TO/IMAGE bs=4096
On sender
# dd if=/dev/DISK bs=4096 conv=noerror,sync | nc IP 4711
== Install grub onto disk image ==
=== legacy, 0.97 ===
Make sure /boot/grub contains all required files (including stages)
# grub --no-floppy
grub> device (hd0) /PATH/TO/IMAGE
grub> geometry (hd0) 4096 16 63
grub> root (hd0,0)
grub> setup (hd0)
== VirtualBox conversion ==
=== From VirtualBox (VDI) ===
VBoxManage clonehd MACHINE.vdi IMAGE.img --format RAW
alt
VBoxManage internalcommands converttoraw MACHINE.vdi IMAGE.img
=== To VirtualBox (VDI) ===
VBoxManage convertfromraw IMAGE.img MACHINE.vdi --format vdi
[[Category:Linux]]
[[Category:Grub]]
2f58f9209ee25819600cf2cc37e95870e80feb15
2954
2953
2013-09-12T22:05:40Z
EXt
1
wikitext
text/x-wiki
== Creating disk image with partition-table from scratch ==
A sparse image can be created using dd:
# dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0
Create partition-table and partitions:
# fdisk /PATH/TO/IMAGE
To create filsystems use kpartx (see below regarding mounting) to setup loopback devices for the partitions. It is possible using losetup but it requires passing the size to mkfs and is generally much more difficult.
== Mounting disk image with partition-table ==
=== Using kpartx ===
kpartx is part of multipath-tools.
# kpartx -av /PATH/TO/IMAGE
add map loop0p1 (253:8): 0 204800 linear /dev/loop0 2048
add map loop0p2 (253:9): 0 20273152 linear /dev/loop0 206848
Partitions can now be accessed using /dev/mapper/loop0p1 etc.
# mount /dev/mapper/loop0p1 /mnt/...
Detatching devices.
# kpartx -dv /PATH/TO/IMAGE
=== Using losetup manually ===
# losetup -f
/dev/loopN
# losetup -o $((512*SECTOR)) /dev/loopN /PATH/TO/IMAGE
# mount /dev/loopN /mnt/...
== Cloning disk ==
(adapt blocksize to fit drive)
# fdisk -l > /PATH/TO/IMAGE.fdisk
# dd if=/dev/DISK of=/PATH/TO/IMAGE bs=4096 conv=noerror,sync
=== Over network ===
On receiver
# nc -l -p 4711 | dd of=/PATH/TO/IMAGE bs=4096
On sender
# dd if=/dev/DISK bs=4096 conv=noerror,sync | nc IP 4711
== Install grub onto disk image ==
=== legacy, 0.97 ===
Make sure /boot/grub contains all required files (including stages)
# grub --no-floppy
grub> device (hd0) /PATH/TO/IMAGE
grub> geometry (hd0) 4096 16 63
grub> root (hd0,0)
grub> setup (hd0)
[[Category:Linux]]
[[Category:Grub]]
a2e277eb26424f61fe1d46d9cceed63d4f97952a
2953
2952
2013-09-12T01:39:41Z
EXt
1
wikitext
text/x-wiki
== Creating disk image with partition-table from scratch ==
A sparse image can be created using dd:
# dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0
Create partition-table and partitions:
# fdisk /PATH/TO/IMAGE
To create filsystems use kpartx (see below regarding mounting) to setup loopback devices for the partitions. It is possible using losetup but it requires passing the size to mkfs and is generally much more difficult.
== Mounting disk image with partition-table ==
=== Using kpartx ===
kpartx is part of multipath-tools.
# kpartx -av /PATH/TO/IMAGE
add map loop0p1 (253:8): 0 204800 linear /dev/loop0 2048
add map loop0p2 (253:9): 0 20273152 linear /dev/loop0 206848
Partitions can now be accessed using /dev/mapper/loop0p1 etc.
# mount /dev/mapper/loop0p1 /mnt/...
Detatching devices.
# kpartx -dv /PATH/TO/IMAGE
=== Using losetup manually ===
# losetup -f
/dev/loopN
# losetup -o $((512*SECTOR)) /dev/loopN /PATH/TO/IMAGE
# mount /dev/loopN /mnt/...
== Cloning disk ==
(adapt blocksize to fit drive)
# fdisk -l > /PATH/TO/IMAGE.fdisk
# dd if=/dev/DISK of=/PATH/TO/IMAGE bs=4096 conv=noerror,sync
=== Over network ===
On receiver
# nc -l -p 4711 | dd of=/PATH/TO/IMAGE bs=4096
On sender
# dd if=/dev/DISK bs=4096 conv=noerror,sync | nc IP 4711
== Install grub onto disk image ==
=== legacy, 0.97 ===
Make sure /boot/grub contains all required files (including stages)
# grub --no-floppy
grub> device (hd0) /PATH/TO/IMAGE
grub> geometry (hd0) 4096 16 63
grub> root (hd0,0)
grub> setup (hd0)
e5965d57efc4d22bdfe39e518564bfc0a2d18d29
2952
2951
2013-09-12T01:08:40Z
EXt
1
wikitext
text/x-wiki
== Creating disk image with partition-table from scratch ==
A sparse image can be created using dd:
# dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0
Create partition-table and partitions:
# fdisk /PATH/TO/IMAGE
To create filsystems use kpartx (see below regarding mounting) to setup loopback devices for the partitions. It is possible using losetup but it requires passing the size to mkfs and is generally much more difficult.
== Mounting disk image with partition-table ==
=== Using kpartx ===
kpartx is part of multipath-tools.
# kpartx -av /PATH/TO/IMAGE
add map loop0p1 (253:8): 0 204800 linear /dev/loop0 2048
add map loop0p2 (253:9): 0 20273152 linear /dev/loop0 206848
Partitions can now be accessed using /dev/mapper/loop0p1 etc.
# mount /dev/mapper/loop0p1 /mnt/...
Detatching devices.
# kpartx -dv /PATH/TO/IMAGE
=== Using losetup manually ===
# losetup -f
/dev/loopN
# losetup -o $((512*SECTOR)) /dev/loopN /PATH/TO/IMAGE
# mount /dev/loopN /mnt/...
== Cloning disk ==
(adapt blocksize to fit drive)
# fdisk -l > /PATH/TO/IMAGE.fdisk
# dd if=/dev/DISK of=/PATH/TO/IMAGE bs=4096 conv=noerror,sync
=== Over network ===
On receiver
# nc -l -p 4711 | dd of=/PATH/TO/IMAGE bs=4096
On sender
# dd if=/dev/DISK bs=4096 conv=noerror,sync | nc IP 4711
bbe2b0d54d48d42331fb49855bd361723392fb6f
2951
2013-09-12T01:06:25Z
EXt
1
Created page with "== Creating disk image with partition-table from scratch == A sparse image can be created using dd: # dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0 Creat..."
wikitext
text/x-wiki
== Creating disk image with partition-table from scratch ==
A sparse image can be created using dd:
# dd if=/dev/zero of=/PATH/TO/IMAGE bs=1024k seek=NUM_MB count=0
Create partition-table and partitions:
# fdisk /PATH/TO/IMAGE
To create filsystems use kpartx (see below regarding mounting) to setup loopback devices for the partitions. It is possible using losetup but it requires passing the size to mkfs and is generally much more difficult.
== Mounting disk image with partition-table ==
=== Using kpartx ===
kpartx is part of multipath-tools.
# kpartx -av /PATH/TO/IMAGE
add map loop0p1 (253:8): 0 204800 linear /dev/loop0 2048
add map loop0p2 (253:9): 0 20273152 linear /dev/loop0 206848
Partitions can now be accessed using /dev/mapper/loop0p1 etc.
# mount /dev/mapper/loop0p1 /mnt/...
Detatching devices.
# kpartx -dv /PATH/TO/IMAGE
=== Using losetup manually ===
# losetup -f
/dev/loopN
# losetup -o $((512*SECTOR)) /dev/loopN /PATH/TO/IMAGE
# mount /dev/loopN /mnt/...
== Cloning disk ==
(adapt blocksize to fit drive)
# fdisk -l > /PATH/TO/IMAGE.fdisk
# dd if=/dev/DISK of=/PATH/TO/IMAGE bs=4096 conv=noerror,sync
bb41e7603f1c392d6a78ef224eeb6cee1b7a0319
Xargs by example
0
1393
2604
2495
2012-01-27T12:49:06Z
EXt
1
wikitext
text/x-wiki
== Caution ==
xargs suffers from the [http://en.wikipedia.org/wiki/Xargs#The_separator_problem The_separator_problem]. If [http://www.gnu.org/software/parallel/ GNU Parallel] is installed it is often safer to use. YouTube has an [http://www.youtube.com/watch?v=OpaiGYxkSuQ intro video for GNU Parallel].
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|
<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories:</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel -X echo Directories:</nowiki>
}}
This will print all directories in the current folder. The command (echo) specified will receive the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|
<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel echo Directory: {}</nowiki>
}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line. -I {} is default for GNU Parallel and thus not needed.
So this time we get each directory printed on a separate line.
{{box note|If xargs -I fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||
<nowiki>ls | xargs -L 4 echo</nowiki>
<nowiki>ls | parallel -L 4 echo</nowiki>
}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|
<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>
<nowiki>echo "foo,bar,baz" | parallel -d, echo</nowiki>
}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||
<nowiki>xargs -a foo -d, -L 1 echo</nowiki>
<nowiki>parallel -a foo -d, echo</nowiki>
}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||
<nowiki>ls | xargs -t -L 4 echo</nowiki>
<nowiki>ls | parallel -t -L 4 echo</nowiki>
}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
As GNU Parallel runs the commands in parallel you may see the output from one of the already run commands mixed in. You can use -v instead which will print the command just before it prints the output to stdout.
{{Box code||
<nowiki>ls | parallel -v -L 4 echo</nowiki>
}}
=== Handling paths with whitespace etc ===
{{Box code||
<nowiki>find . -print0 | xargs -0 echo</nowiki>
}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
GNU Parallel does the right thing for file names containing ", ' and space. Only if the file names contain newlines you need -0.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|
<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>
<nowiki>find . -type d -name ".svn" -print | parallel rm -rf</nowiki>
}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
The GNU Parallel version will run the rm's in parallel.
[[Category:Linux]]
40ac9938e1cce31c7fda791ede230a443cebacc2
2495
2397
2011-05-04T19:37:10Z
187.56.54.165
0
wikitext
text/x-wiki
== Caution ==
xargs suffers from the [http://en.wikipedia.org/wiki/Xargs#The_separator_problem The_separator_problem]. If [http://www.gnu.org/software/parallel/ GNU Parallel] is installed it is often safer to use. YouTube has an [http://www.youtube.com/watch?v=OpaiGYxkSuQ intro video for GNU Parallel].
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|
<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories:</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel -X echo Directories:</nowiki>
}}
This will print all directories in the current folder. The command (echo) specified will receive the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|
<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel echo Directory: {}</nowiki>
}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line. -I {} is default for GNU Parallel and thus not needed.
So this time we get each directory printed on a separate line.
{{box note|If xargs -I fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||
<nowiki>ls | xargs -L 4 echo</nowiki>
<nowiki>ls | parallel -L 4 echo</nowiki>
}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|
<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>
<nowiki>echo "foo,bar,baz" | parallel -d, echo</nowiki>
}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||
<nowiki>xargs -a foo -d, -L 1 echo</nowiki>
<nowiki>parallel -a foo -d, echo</nowiki>
}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||
<nowiki>ls | xargs -t -L 4 echo</nowiki>
<nowiki>ls | parallel -t -L 4 echo</nowiki>
}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
As GNU Parallel runs the commands in parallel you may see the output from one of the already run commands mixed in. You can use -v instead which will print the command just before it prints the output to stdout.
{{Box code||
<nowiki>ls | parallel -v -L 4 echo</nowiki>
}}
=== Handling paths with whitespace etc ===
{{Box code||
<nowiki>find . -print0 | xargs -0 echo</nowiki>
}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
GNU Parallel does the right thing for file names containing ", ' and space. Only if the file names contain newlines you need -0.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|
<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>
<nowiki>find . -type d -name ".svn" -print | parallel rm -rf</nowiki>
}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
The GNU Parallel version will run the rm's in parallel.
1da5826fcc05ec749fa041df63b910decb821bf7
2397
2390
2010-07-14T09:27:03Z
EXt
1
wikitext
text/x-wiki
== Caution ==
xargs suffers from the [http://en.wikipedia.org/wiki/Xargs#The_separator_problem The_separator_problem]. If [http://www.gnu.org/software/parallel/ GNU Parallel] is installed it is often safer to use. YouTube has an [http://www.youtube.com/watch?v=OpaiGYxkSuQ intro video for GNU Parallel].
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|
<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories:</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel -X echo Directories:</nowiki>
}}
This will print all directories in the current folder. The command (echo) specified will receive the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|
<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel echo Directory: {}</nowiki>
}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line. -I {} is default for GNU Parallel and thus not needed.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||
<nowiki>ls | xargs -L 4 echo</nowiki>
<nowiki>ls | parallel -L 4 echo</nowiki>
}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|
<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>
<nowiki>echo "foo,bar,baz" | parallel -d, echo</nowiki>
}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||
<nowiki>xargs -a foo -d, -L 1 echo</nowiki>
<nowiki>parallel -a foo -d, echo</nowiki>
}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||
<nowiki>ls | xargs -t -L 4 echo</nowiki>
<nowiki>ls | parallel -t -L 4 echo</nowiki>
}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
As GNU Parallel runs the commands in parallel you may see the output from one of the already run commands mixed in. You can use -v instead which will print the command just before it prints the output to stdout.
{{Box code||
<nowiki>ls | parallel -v -L 4 echo</nowiki>
}}
=== Handling paths with whitespace etc ===
{{Box code||
<nowiki>find . -print0 | xargs -0 echo</nowiki>
}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
GNU Parallel does the right thing for file names containing ", ' and space. Only if the file names contain newlines you need -0.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|
<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>
<nowiki>find . -type d -name ".svn" -print | parallel rm -rf</nowiki>
}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
The GNU Parallel version will run the rm's in parallel.
cef1ea39e62925ddf591498b9057440dbf67569a
2390
2333
2010-07-12T19:48:29Z
87.72.108.233
0
GNU Parallel is safer than xargs
wikitext
text/x-wiki
== Caution ==
xargs suffers from the [http://en.wikipedia.org/wiki/Xargs#The_separator_problem The_separator_problem]. If [http://www.gnu.org/software/parallel/ GNU Parallel] is installed it is often safer to use. YouTube has an [http://www.youtube.com/watch?v=OpaiGYxkSuQ intro video for GNU Parallel].
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories:</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel -X echo Directories:</nowiki>}}
This will print all directories in the current folder. The command (echo) specified will receive the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>
<nowiki>find . -maxdepth 1 -type d -print | parallel echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line. -I {} is default for GNU Parallel and thus not needed.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||<nowiki>ls | xargs -L 4 echo</nowiki>
<nowiki>ls | parallel -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>
<nowiki>echo "foo,bar,baz" | parallel -d, echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||<nowiki>xargs -a foo -d, -L 1 echo</nowiki>
<nowiki>parallel -a foo -d, echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||<nowiki>ls | xargs -t -L 4 echo</nowiki>
<nowiki>ls | parallel -t -L 4 echo</nowiki>}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
As GNU Parallel runs the commands in parallel you may see the output from one of the already run commands mixed in. You can use -v instead which will print the command just before it prints the output to stdout.
{{Box code||<nowiki>ls | parallel -v -L 4 echo</nowiki>}}
=== Handling paths with whitespace etc ===
{{Box code||<nowiki>find . -print0 | xargs -0 echo</nowiki>}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
GNU Parallel does the right thing for file names containing ", ' and space. Only if the file names contain newlines you need -0.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>
<nowiki>find . -type d -name ".svn" -print | parallel rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
The GNU Parallel version will run the rm's in parallel.
94ce324b58814f1396f24934acdeb2c97e782b0e
2333
2332
2009-09-09T19:48:15Z
163.231.6.68
0
should be present tense
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will receive the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||<nowiki>xargs -a foo -d, -L 1 echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||<nowiki>ls | xargs -t -L 4 echo</nowiki>}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
=== Handling paths with whitespace etc ===
{{Box code||<nowiki>find . -print0 | xargs -0 echo</nowiki>}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
308cb9fcd3cd7b1507f3c54133463a41c9caf531
2332
2220
2009-09-09T19:46:13Z
163.231.6.68
0
fixed some spelling errors
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will received the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specified to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||<nowiki>xargs -a foo -d, -L 1 echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||<nowiki>ls | xargs -t -L 4 echo</nowiki>}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
=== Handling paths with whitespace etc ===
{{Box code||<nowiki>find . -print0 | xargs -0 echo</nowiki>}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
9a754c5a6c9efdfea2bcb58183bac5a76f44c776
2220
2216
2008-05-20T15:36:58Z
EXt
1
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||<nowiki>xargs -a foo -d, -L 1 echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||<nowiki>ls | xargs -t -L 4 echo</nowiki>}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
=== Handling paths with whitespace etc ===
{{Box code||<nowiki>find . -print0 | xargs -0 echo</nowiki>}}
Each argument passed from find to xargs is separated with a null-terminator instead of space. It's hard to present a case where it is required as the above example would work anyway. But if you get problems with paths which may contain whitespace, backspaces or other special characters use null-terminated arguments instead.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
3d49976ee7dff658a28739608ac2ca407be2c8eb
2216
2215
2008-05-18T20:06:58Z
EXt
1
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code||<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code||<nowiki>xargs -a foo -d, -L 1 echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
=== Showing command to be executed ===
{{Box code||<nowiki>ls | xargs -t -L 4 echo</nowiki>}}
Before running the command -t will cause xargs to print the command to run to stderr. In this case it will output "echo fred barney wilma betty" before running that same line.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
cd5bcf939f852097939cf6410f8db179dc5e3a6b
2215
2214
2008-05-18T19:59:24Z
EXt
1
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code|Multiple arguments|<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
=== Custom delimiters ===
{{Box code|Using comma as delimiter|<nowiki>echo "foo,bar,baz" | xargs -d, -L 1 echo</nowiki>}}
The -d argument is used to use a custom delimiter, c-style escaping is supported (\n is newline for instance). In this case it will output foo, bar and baz on a separate line.
=== Read from file instead of stdin ===
{{Box code|Read from the file foo|<nowiki>xargs -a foo -d, -L 1 echo</nowiki>}}
The -a argument is used to read from a file instead of stdin. Otherwise this example is the same as the previous.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
46e400776a31e3ff008a0a4bd60238ca4e168848
2214
2213
2008-05-18T19:53:02Z
EXt
1
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code|Multiple arguments|<nowiki>ls | xargs -L 4 echo</nowiki>}}
Using the -L argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
9d706d2b761af70c2142d942aaaffd258e2d19f5
2213
2131
2008-05-18T19:49:35Z
EXt
1
wikitext
text/x-wiki
== Examples ==
=== Using a placeholder ===
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
=== Multiple lines as one argument ===
{{Box code|Multiple arguments|<nowiki>ls | xargs -n 4 echo</nowiki>}}
Using the -n argument we can concatenate n lines into one (separated with spaces of course). In this case it will output four files/directories on each line.
== Snippets ==
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
6395026a9136e4a864339c5c04b3687f4b2abaac
2131
2126
2007-08-09T21:13:53Z
EXt
1
wikitext
text/x-wiki
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm -rf</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
ca5c79c741f55a3a12b56bf225ca121bb2f31cd6
2126
2125
2007-02-20T17:51:29Z
EXt
1
wikitext
text/x-wiki
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
{{box note|If xargs -i fails you might need a newer version of xargs. The [http://www.gentoo.org Gentoo] package [http://gentoo-portage.com/sys-apps/findutils findutils] contains xargs.}}
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
4c8c6b12952ca4337f0faf73c6e05964a9295ac1
2125
2124
2007-02-20T01:05:31Z
EXt
1
wikitext
text/x-wiki
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
{{Box code|Lists all directories|<nowiki>find . -maxdepth 1 -type d -print | xargs echo Directories: </nowiki>}}
This will print all directories in the current folder. The command (echo) specified will recived the input from find and be executed once. That's why this code will output all directories on one line.
{{Box code|Lists all directories using -I|<nowiki>find . -maxdepth 1 -type d -print | xargs -I {} echo Directory: {}</nowiki>}}
This time we added -I {} to xargs. This is the replacement argument. The command specifed to xargs will now be executed once for each line of output from find and replace {} with that line.
So this time we get each directory printed on a separate line.
Keep this in mind when using xargs. When creating more complex commands you often need to use the -I argument. Like if you want to run multiple commands and/or pipe to another command.
06ff1552d734f618d19b2b3e9a20d1e91e8aa371
2124
1958
2007-02-20T00:52:13Z
EXt
1
wikitext
text/x-wiki
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm</nowiki>}}
The above command will execute rm on each file found by 'find'. The above construct can be used to execute a command on multiple files. This is similar to the -exec argument find has but doesn't suffer from the "Too Many Arguments" problem. And xargs is easier to read than -exec in most cases.
4aef074604757f6dee3cd8a7a7101450e2bf977b
1958
2006-07-18T18:31:18Z
EXt
1
wikitext
text/x-wiki
{{Box code|Cleans current directory from all subversion directories recursively.|<nowiki>find . -type d -name ".svn" -print | xargs rm</nowiki>}}
6931f365d2bdcb563942537bdd14c007481a231d
Xlib and GLX: Part 1
0
1419
2643
2642
2012-01-29T21:30:03Z
EXt
1
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
<codebox title="">
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</codebox>
== GLX ==
== Complete sample ==
<codebox filename="glx1.c" lang="c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
int main (int argc, const char* argv[]){
init(640,480);
return 0;
}
</codebox>
[[Category:OpenGL]]
92ed90d2f655b3e279bc35ea82cbad4f78c29eb4
2642
2631
2012-01-29T14:53:24Z
EXt
1
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
<codebox title="">
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</codebox>
== GLX ==
== Complete sample ==
<codebox filename="glx1.c" lang="c">
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
void main (){
init(640,480);
}
</codebox>
[[Category:OpenGL]]
a9d3d374dd7f5ddddf137a2ffcd3555ff3416b75
2631
2496
2012-01-27T13:03:54Z
EXt
1
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
<codebox title="">
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</codebox>
== GLX ==
== Complete sample ==
<codebox title="">
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
void main (){
init(640,480);
}
</codebox>
[[Category:OpenGL]]
b6657edc5e2a8309e031f3b215ae90c8ae53a127
2496
2461
2011-05-05T19:05:22Z
87.126.182.51
0
/* Complete sample */
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
<codebox title="">
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</codebox>
== GLX ==
== Complete sample ==
<codebox title="">
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
void main (){
init(640,480);
}
</codebox>
7d48b6cbee95b9922cf2c1bdab6893194734b3ef
2461
2081
2010-12-27T12:11:46Z
EXt
1
proper codebox
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
<codebox title="">
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</codebox>
== GLX ==
== Complete sample ==
<codebox title="">
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
</codebox>
a9122dd2d19cf64bc157dc5059da5d67732bb22d
2081
2006-10-11T22:56:41Z
EXt
1
wikitext
text/x-wiki
== Description ==
Programming with Xlib can be a pain-in-the-ass for starters. And using Xlib and GLX together might seem impossible. Almost no good tutorial covers this topics. And those who do uses many deprecated function calls.
== Xlib basics ==
<nowiki>[Write a basic description of how X works here]</nowiki>
=== Opening a connection ===
{{box code||
<code><cpp/>
#include <X11/Xlib.h>
Display* dpy = XOpenDisplay(NULL);
if( dpy == NULL ) {
printf("Could not connect to an X server\n");
exit(0);
}
</code>
}}
== GLX ==
== Complete sample ==
{{box code||
<code><cpp/>
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
struct GLWindow {
Display* dpy;
Window win;
Window root;
GLXFBConfig* fbConfigs;
GLXWindow glxWin;
GLXContext ctx;
XVisualInfo* vi;
Colormap cmap;
XSetWindowAttributes swa;
int width;
int height;
} GLWindow;
void init(int w, int h){
/********************/
/* ===== XLIB ===== */
/********************/
/* Open display */
GLWindow.dpy = XOpenDisplay(NULL);
if(GLWindow.dpy == NULL) {
printf("Could not connect to an X server\n");
exit(0);
}
/* Retrieve a mode */
int doubleBufferAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_RENDER_TYPE,
GLX_RGBA_BIT,
GLX_DOUBLEBUFFER, True,
GLX_RED_SIZE, 1,
GLX_BLUE_SIZE, 1,
None
};
GLWindow.root = DefaultRootWindow(GLWindow.dpy);
int numReturned = 0;
GLWindow.fbConfigs = glXChooseFBConfig( GLWindow.dpy, DefaultScreen(GLWindow.dpy), doubleBufferAttributes, &numReturned );
if ( GLWindow.fbConfigs == NULL ) {
printf( "No double buffered config available\n" );
exit( EXIT_FAILURE );
}
GLWindow.vi = glXGetVisualFromFBConfig(GLWindow.dpy, GLWindow.fbConfigs[0]);
if(GLWindow.vi == NULL) {
printf("No appropriate visual found\n");
exit(0);
}
GLWindow.cmap = XCreateColormap(GLWindow.dpy, GLWindow.root, GLWindow.vi->visual, AllocNone);
GLWindow.swa.colormap = GLWindow.cmap;
GLWindow.swa.event_mask = ExposureMask | KeyPressMask;
/* Create a window */
GLWindow.win = XCreateWindow(GLWindow.dpy, GLWindow.root, 0, 0, w, h, 0, GLWindow.vi->depth, InputOutput, GLWindow.vi->visual, CWColormap | CWEventMask, &GLWindow.swa);
XMapWindow(GLWindow.dpy, GLWindow.win);
XStoreName(GLWindow.dpy, GLWindow.win, "ImageBrowser");
/* Create an OpenGL context */
GLWindow.ctx = glXCreateContext(GLWindow.dpy, GLWindow.vi, NULL, GL_TRUE);
glXMakeCurrent(GLWindow.dpy, GLWindow.win, GLWindow.ctx);
/* Store the size */
GLWindow.width = w;
GLWindow.height = h;
/********************/
/* ==== OpenGL ==== */
/********************/
/* Viewport related */
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)w/(GLfloat)h,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Settings */
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glClearColor(1.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glClearStencil(0);
glEnable(GL_CULL_FACE);
}
</code>
}}
ad86e767907834e74770e76ccd5c7bc37548917a
Xlib and GLX: Part 2
0
1420
2646
2645
2012-01-29T21:51:54Z
EXt
1
wikitext
text/x-wiki
=== Catching the WM close-button ===
<codebox title="">
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</codebox>
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
<codebox filename="glx2.c" lang="c">
static void poll(){
XEvent event;
while ( XPending(GLWindow.dpy) > 0 ){
XNextEvent(GLWindow.dpy, &event);
switch (event.type){
case KeyPress:
{
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
}
</codebox>
[[Category:OpenGL]]
bb884ab8953937626ea4add5e463e558a5ca4297
2645
2644
2012-01-29T21:39:42Z
EXt
1
wikitext
text/x-wiki
=== Catching the WM close-button ===
<codebox title="">
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</codebox>
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
<codebox filename="glx2.c" lang="c">
XEvent event;
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
</codebox>
[[Category:OpenGL]]
e77cb0f67b6cf4cc1ef9b6ead100f3ce55e569af
2644
2630
2012-01-29T21:31:42Z
EXt
1
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
<codebox title="">
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</codebox>
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
<codebox filename="glx2.c" lang="c">
XEvent event;
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
</codebox>
[[Category:OpenGL]]
dfa1065ad78ce0c234c3b4dd9f394f208255e97b
2630
2462
2012-01-27T13:03:40Z
EXt
1
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
<codebox title="">
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</codebox>
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
<codebox title="">
XEvent event;
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
</codebox>
[[Category:OpenGL]]
56d48058e65c1ae3a59f1247f13aa9cf1248758a
2462
2095
2010-12-27T12:12:17Z
EXt
1
proper codebox
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
<codebox title="">
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</codebox>
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
<codebox title="">
XEvent event;
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
</codebox>
614219deac9912d3920b145e5b739ff403594a47
2095
2083
2006-12-05T16:39:05Z
EXt
1
Wrote about XLookupString
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
{{box code||
<code><cpp/>
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</code>
}}
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
=== Getting keyboard input ===
First, make sure your window has been created with the KeyPressMask.
In your X Event look for the KeyPress event. The event.xkey struct contains enought info to be converted to an ascii character using XLookupString. XLookupString returns the numbers of characters written to the buffer. In this case a maximum of 1 can be written. If a non-printable character occurs the lenght will be 0. XLookupString also looks for key modifiers like shift and alt.
{{box code||
<code><cpp/>
XEvent event;
while ( XPending(dpy) > 0 ){
XNextEvent(dpy, &event);
switch (event.type){
case KeyPress:
char buf[2];
int len;
KeySym keysym_return;
len = XLookupString(&event.xkey, buf, 1, &keysym_return, NULL);
if ( len != 0 ){
printf("Char: %c",buf[0]);
}
break;
default:
printf("Unhandled event: %d\n",event.type);
break;
}
}
</code>
}}
ab649c5fe2b35739ea2539d9fa9000942732007b
2083
2082
2006-11-09T11:48:12Z
Chris
7
/* Catching the WM close-button */
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
{{box code||
<code><cpp/>
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</code>
}}
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is caught you need to check if event.xclient.data.l[0] equals GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
5d9f6940a7eed58444aaf9678994b80254be804e
2082
2006-10-11T23:17:05Z
EXt
1
wikitext
text/x-wiki
== Description ==
Still not tired of Xlib and GLX? In this part I will talk about how to handle the window managers fscking close-button.
This article required lots of cleanup ><
=== Catching the WM close-button ===
{{box code||
<code><cpp/>
/* Tell the window you want to recive the fscking event */
Atom wm_delete_window = XInternAtom(GLWindow.dpy, "WM_DELETE_WINDOW", false);
XSetWMProtocols(GLWindow.dpy, GLWindow.win, &GLWindow.wm_delete_window, 1);
</code>
}}
Run that code any time after creating the window. Now you can catch the event ClientMessage in your event loop. When that event is cought you need to check if event.xclient.data.l[0] equals to GLWindow.wm_delete_window.
Now, if just someone could have told me this instead of me having to dig through hundreds of lines of X code.
2fd1d5a2c9f622d557a21b11f253e31152644ed7
Xorg/Running applications as another user
0
1832
3040
3039
2015-08-08T00:46:15Z
EXt
1
wikitext
text/x-wiki
Sometimes it is desirable to run a GUI application as another user, for instance running your browser as a separate user (browsers such as Firefox and Chrome are complex and bound to have security issues). Out-of-the-box the X server will not allow the application to run:
<nowiki>$ sudo -u otheruser firefox
Error: cannot open display: :0.0</nowiki>
This happens because that user doesn't carry the authorization cookie required to connect to the current display. By default each user stores its authorization data in {{Filename|~/.Xauthority}} and is modified using {{Filename|xauth}}. You list current available cookies by executing <tt>xauth list</tt> and add new using <tt><nowiki>xauth [-f FILENAME] add :0.0 . KEY</nowiki></tt>.
As your primary user run:
<nowiki>$ xauth list
myhost/unix:0 MIT-MAGIC-COOKIE-1 0123456789abcdef0123456789abcdef</nowiki>
The last part is the cookie as a hex key that can be imported for other users:
<nowiki>$ sudo -u otheruser xauth -f /home/otheruser/.Xauthority add :0.0 . 0123456789abcdef0123456789abcdef</nowiki>
Since sudo by default carries the env. variable XAUTHORITY (set to your current file) you either have to override/unset the variable or use <tt>-f FILENAME</tt>. Failing to do this will make the command hang while trying to acquire file lock (it will eventually timeout). If you get an error that the file does not exist you can just create an empty file with <tt>touch /home/otheruser/.Xauthority</tt> and retry.
You can verify that it was added correctly using <tt>xauth list</tt>
<nowiki>$ sudo -u otheruser xauth -f /home/otheruser/.Xauthority list
myhost/unix:0 MIT-MAGIC-COOKIE-1 0123456789abcdef0123456789abcdef</nowiki>
</nowiki>
If you see the same entry as before the authorization is setup correctly and you should now be able to run GUI applications as that user.
== TL;DR ==
<syntaxhighlight lang="bash">
# Create user
$ useradd -m surf
# Once (or in your .xinitrc if Xorg changes it every time you restart)
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority xauth add ${DISPLAY} . $(xauth list | grep $(uname -n) | tr -s ' ' | cut -d ' ' -f3)
# Start application
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority firefox
</syntaxhighlight>
== Passwordless ==
To run without password run visudo and add a new entry as following:
<syntaxhighlight lang="bash">
user ALL=(otheruser) NOPASSWD: /usr/bin/firefox
</syntaxhighlight>
== Wrapper script ==
Wrapper script to make it a bit easier when running applications (assumes xauth and sudo is setup already)
<codebox filename="surf.sh" lang="bash">
#!/bin/sh
if [ $# -eq 0 ]; then
echo "usage: $0 [COMMAND...]"
echo "runs COMMAND as the pseudo-Xorg-sandboxed used 'surf'"
exit 1
fi
exec sudo -n -u otheruser XAUTHORITY=/home/otheruser/.Xauthority "$@"
</codebox>
[[Category: Linux]]
[[Category: Xorg]]
6946e062b5f003de224e51ee164dcd78b5be1887
3039
3038
2015-08-08T00:45:51Z
EXt
1
wikitext
text/x-wiki
Sometimes it is desirable to run a GUI application as another user, for instance running your browser as a separate user (browsers such as Firefox and Chrome are complex and bound to have security issues). Out-of-the-box the X server will not allow the application to run:
<nowiki>$ sudo -u otheruser firefox
Error: cannot open display: :0.0</nowiki>
This happens because that user doesn't carry the authorization cookie required to connect to the current display. By default each user stores its authorization data in {{Filename|~/.Xauthority}} and is modified using {{Filename|xauth}}. You list current available cookies by executing <tt>xauth list</tt> and add new using <tt><nowiki>xauth [-f FILENAME] add :0.0 . KEY</nowiki></tt>.
As your primary user run:
<nowiki>$ xauth list
myhost/unix:0 MIT-MAGIC-COOKIE-1 0123456789abcdef0123456789abcdef</nowiki>
The last part is the cookie as a hex key that can be imported for other users:
<nowiki>$ sudo -u otheruser xauth -f /home/otheruser/.Xauthority add :0.0 . 0123456789abcdef0123456789abcdef</nowiki>
Since sudo by default carries the env. variable XAUTHORITY (set to your current file) you either have to override/unset the variable or use <tt>-f FILENAME</tt>. Failing to do this will make the command hang while trying to acquire file lock (it will eventually timeout). If you get an error that the file does not exist you can just create an empty file with <tt>touch /home/otheruser/.Xauthority</tt> and retry.
You can verify that it was added correctly using <tt>xauth list</tt>
<nowiki>$ sudo -u otheruser xauth -f /home/otheruser/.Xauthority list
myhost/unix:0 MIT-MAGIC-COOKIE-1 0123456789abcdef0123456789abcdef</nowiki>
</nowiki>
If you see the same entry as before the authorization is setup correctly and you should now be able to run GUI applications as that user.
== TL;DR ==
<syntaxhighlight lang="bash">
# Create user
$ useradd -m surf
# Once (or in your .xinitrc if Xorg changes it every time you restart)
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority xauth add ${DISPLAY} . $(xauth list | grep $(uname -n) | tr -s ' ' | cut -d ' ' -f3)
# Start application
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority firefox
</syntaxhighlight>
== Passwordless ==
To run without password run visudo and add a new entry as following:
<syntaxhighlight lang="bash">
user ALL=(otheruser) NOPASSWD: /usr/bin/firefox
</syntaxhighlight>
== Wrapper script ==
Wrapper script to make it a bit easier when running applications (assumes xauth and sudo is setup already)
<codebox filename="surf.sh" lang="bash">
#!/bin/sh
if [ $# -eq 0 ]; then
echo "usage: $0 [COMMAND...]"
echo "runs COMMAND as the pseudo-Xorg-sandboxed used 'surf'"
exit 1
fi
exec sudo -n -u otheruser XAUTHORITY=/home/otheruser/.Xauthority "$@"
</codebox>
f42ccc6a277d91ee8db81632ec5010484ba7a22e
3038
2015-08-08T00:42:55Z
EXt
1
Created page with "Sometimes it is desirable to run a GUI application as another user, for instance running your browser as a separate user (browsers such as Firefox and Chrome are complex and b..."
wikitext
text/x-wiki
Sometimes it is desirable to run a GUI application as another user, for instance running your browser as a separate user (browsers such as Firefox and Chrome are complex and bound to have security issues). Out-of-the-box the X server will not allow the application to run:
<nowiki>$ sudo -u otheruser firefox
Error: cannot open display: :0.0</nowiki>
This happens because that user doesn't carry the authorization cookie required to connect to the current display. By default each user stores its authorization data in {{Filename|~/.Xauthority}} and is modified using {{Filename|xauth}}. You list current available cookies by executing <tt>xauth list</tt> and add new using <tt><nowiki>xauth [-f FILENAME] add :0.0 . KEY</nowiki></tt>.
As your primary user run:
<nowiki>$ xauth list
myhost/unix:0 MIT-MAGIC-COOKIE-1 0123456789abcdef0123456789abcdef</nowiki>
The last part is the cookie as a hex key that can be imported for other users:
<nowiki>$ sudo -u otheruser xauth -f /home/otheruser/.Xauthority add :0.0 . 0123456789abcdef0123456789abcdef</nowiki>
Since sudo by default carries the env. variable XAUTHORITY (set to your current file) you either have to override/unset the variable or use <tt>-f FILENAME</tt>. Failing to do this will make the command hang while trying to acquire file lock (it will eventually timeout). If you get an error that the file does not exist you can just create an empty file with <tt>touch /home/otheruser/.Xauthority</tt> and retry.
== TL;DR ==
<syntaxhighlight lang="bash">
# Create user
$ useradd -m surf
# Once (or in your .xinitrc if Xorg changes it every time you restart)
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority xauth add ${DISPLAY} . $(xauth list | grep $(uname -n) | tr -s ' ' | cut -d ' ' -f3)
# Start application
$ sudo -u otheruser XAUTHORITY=/home/surf/.Xauthority firefox
</syntaxhighlight>
== Passwordless ==
To run without password run visudo and add a new entry as following:
<syntaxhighlight lang="bash">
user ALL=(otheruser) NOPASSWD: /usr/bin/firefox
</syntaxhighlight>
== Wrapper script ==
Wrapper script to make it a bit easier when running applications (assumes xauth and sudo is setup already)
<codebox filename="surf.sh" lang="bash">
#!/bin/sh
if [ $# -eq 0 ]; then
echo "usage: $0 [COMMAND...]"
echo "runs COMMAND as the pseudo-Xorg-sandboxed used 'surf'"
exit 1
fi
exec sudo -n -u otheruser XAUTHORITY=/home/otheruser/.Xauthority "$@"
</codebox>
2c8ad100df6317bb9a29ff3b71d96652b85612ab
Xorg user permissions
0
1589
2663
2012-02-23T12:48:41Z
EXt
1
Created page with "To allow other users to use DISPLAY and open applications in X: xhost +local:USERNAME [[Category:xorg]] [[Category:linux]]"
wikitext
text/x-wiki
To allow other users to use DISPLAY and open applications in X:
xhost +local:USERNAME
[[Category:xorg]]
[[Category:linux]]
40404ea8ff9cd1bcb79aeab2ade82d5ae61d2503
Yaw, pitch, roll camera
0
1397
2626
2439
2012-01-27T13:02:55Z
EXt
1
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
<codebox title="Camera.h">
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</codebox>
<codebox title="Camera.cpp">
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (pos.x,pos.y,pos.z,
pos.x + target.x,
pos.y + target.y,
pos.z + target.z,
0,1,0
);
}
</codebox>
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
[[Category:OpenGL]]
de3f0c75bfe54ceac2e16de9f4189552273a39cb
2439
2421
2010-12-25T17:23:50Z
EXt
1
better codebox
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
<codebox title="Camera.h">
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</codebox>
<codebox title="Camera.cpp">
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (pos.x,pos.y,pos.z,
pos.x + target.x,
pos.y + target.y,
pos.z + target.z,
0,1,0
);
}
</codebox>
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
bfeae2dbcd5bd4130619f0ef22bc90159ea1e940
2421
2414
2010-12-25T16:00:07Z
EXt
1
hilighting
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
{{Box code|title=Camera.h|
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
}}
{{Box code|title=Camera.cpp|
void Camera::motion(int x,int y){
theta+{{=}} x / 200; /* Adjust this to control the sensitivity */
phi+{{=}} y / 200;
target.x {{=}} cos(theta) * sin(phi);
target.y {{=}} cos(phi);
target.z {{=}} sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (pos.x,pos.y,pos.z,
pos.x + target.x,
pos.y + target.y,
pos.z + target.z,
0,1,0
);
}
}}
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
f6cf4575f9afea355158cd006d2a569855d7dba3
2414
2000
2010-12-17T00:26:43Z
110.174.48.248
0
Fix the boxes
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
{{Box code|Camera.h|
<pre><cpp />
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</pre>
}}
{{Box code|Camera.cpp|
<pre><cpp />
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (pos.x,pos.y,pos.z,
pos.x + target.x,
pos.y + target.y,
pos.z + target.z,
0,1,0
);
}
</pre>
}}
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
dc5303107d875579a6097376d3e9553405fd07a5
2000
1969
2006-08-01T19:57:33Z
EXt
1
/* Basic camera (omitting roll) */
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
{{Box code|Camera.h|
<code><cpp/>
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</code>
}}
{{Box code|Camera.cpp|
<code><cpp/>
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (pos.x,pos.y,pos.z,
pos.x + target.x,
pos.y + target.y,
pos.z + target.z,
0,1,0
);
}
</code>
}}
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
b1ed9c4f4282d47b383ff543447e0080e7b1af1f
1969
1968
2006-07-22T10:30:52Z
EXt
1
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
Also, yaw might sometimes be refered to as heading, but it's the same thing.
== Basic camera (omitting roll) ==
{{Box code|Camera.h|
<code><cpp/>
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</code>
}}
{{Box code|Camera.cpp|
<code><cpp/>
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (coord.x,coord.y,coord.z,
coord.x + target.x,
coord.y + target.y,
coord.z + target.z,
0,1,0
);
}
</code>
}}
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
7ec9b8a9a479ecc6fad226d713179b3e537163a8
1968
1967
2006-07-22T10:30:05Z
EXt
1
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
== Basic camera (omitting roll) ==
{{Box code|Camera.h|
<code><cpp/>
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</code>
}}
{{Box code|Camera.cpp|
<code><cpp/>
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (coord.x,coord.y,coord.z,
coord.x + target.x,
coord.y + target.y,
coord.z + target.z,
0,1,0
);
}
</code>
}}
I won't explain the formula used to convert the angles to a vector, use it if you want. It works in this case. When you move the mouse call the motion method with dx and dy.
593ef1c414fb962599c111d5528d49c8d75b1581
1967
1966
2006-07-22T10:07:15Z
EXt
1
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it. Depending on the application we might omit roll. In a typical FPS we can, but a flight simulator would strange if the camera can't roll.
== Basic camera (omitting roll) ==
{{Box code|Camera.h|
<code><cpp/>
class Camera{
public:
void view();
void motion(int x,int y);
protected:
Vector3 pos;
Vector3 target;
GLfloat phi;
GLfloat theta;
};
</code>
}}
{{Box code|Camera.cpp|
<code><cpp/>
void Camera::motion(int x,int y){
theta+= x / 200; /* Adjust this to control the sensitivity */
phi+= y / 200;
target.x = cos(theta) * sin(phi);
target.y = cos(phi);
target.z = sin(theta) * sin(phi);
}
void Camera::view(){
gluLookAt (coord.x,coord.y,coord.z,
coord.x + target.x,
coord.y + target.y,
coord.z + target.z,
0,1,0
);
}
</code>
}}
734346d3dd45eeb4c39ebee557f7a4eaa4cb8bfe
1966
2006-07-22T09:11:17Z
EXt
1
wikitext
text/x-wiki
Yaw, pitch and roll is a way of describing the rotation of the camera in 3D. There is other ways like quaternions but this is the simplest. Yaw, pitch and roll is the name of how much we should rotate around each axis.
== Yaw, pitch and roll ==
[[Image:Yawpitchroll.png|frame|Fig 1.]]
Think about yourself as the camera right now. Look around a bit. Yaw is the angle when moving the head left ↔ right (rotation around Y-axis). Pitch is up and down (rotation around X-axis). Roll, which we usually don't experience is when you tilt your head (rotation around Z-axis).
This can be a bit confusing at start but you get used to it.
2c4a0f92d454a5bbf3ce564de70896e8f29f2dd5
Youtube Rickroll Proxy
0
1584
2652
2651
2012-02-01T22:24:23Z
EXt
1
wikitext
text/x-wiki
<youtube size="380x213" frame>_O6o5e-PpRs</youtube>
Inspired by [http://www.ex-parrot.com/~pete/upside-down-ternet.html Upside-Down-Ternet] I created a similar setup which replaces all youtube videos with Rick Astley's “Never Gonna Give You Up.” aka rickroll. It won't work for HTTPS, at least not without getting certificate failures. It works by first hijacking connections to the content delivery networks, discards your requests and inserts rickrolls instead. This setups also hijacks youtube.com and ytimg.com requests but only proxies to a real server, in retrospect I realized it wasn't necessary but I present the solution as it was when I made it.
== DNS config ==
<codebox lang="text" title="named.conf">
# youtube hijack proxy
zone "youtube.com" IN {
type master;
file "pri/youtube.zone";
};
zone "ytimg.com" {
type master;
file "pri/ytimg.zone";
};
</codebox>
<codebox lang="text" title="pri/youtube.zone" highlight="4">
$ORIGIN youtube.com.
@ IN A 10.13.37.254
www IN A 10.13.37.254
*.c IN A 10.13.37.253
</codebox>
<codebox lang="text" title="pri/ytimg.zone">
$ORIGIN ytimg.com.
@ IN A 10.13.37.254
s IN A 10.13.37.254
i1 IN A 10.13.37.254
i2 IN A 10.13.37.254
i3 IN A 10.13.37.254
i4 IN A 10.13.37.254
</codebox>
Please note that *.c.youtube.com is redirected to a different IP!
== iptables ==
<codebox lang="bash">
iptables -A PREROUTING -t nat -d 10.13.37.254/32 -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 13254
iptables -A PREROUTING -t nat -d 10.13.37.253/32 -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 13253
</codebox>
You can redirect to another host if you want, I chose to only redirect port as I was already running apache on port 80.
== script ==
<codebox lang="python" filename="fulhack.py">
#!/usr/bin/env python
# -*- coding: utf-8; -*-
import socket
import sys
import random
import urllib
from copy import copy
from signal import signal, SIGINT
from threading import Thread
from select import select
from httplib import HTTPResponse
from BaseHTTPServer import BaseHTTPRequestHandler
youtube = [
'173.194.32.0',
'173.194.32.1',
'173.194.32.2',
'173.194.32.3',
'173.194.32.4',
'173.194.32.5',
'173.194.32.6',
'173.194.32.7',
'173.194.32.8',
'173.194.32.9',
'173.194.32.10',
'173.194.32.11',
'173.194.32.12',
'173.194.32.13',
'173.194.32.14',
'173.194.32.15']
cdn = []
rickroll = open('./rickroll').read()
running = True
class HTTPRequest(BaseHTTPRequestHandler):
def __init__(self, sock):
self.rfile = sock.makefile("rb")
self.raw_requestline = self.rfile.readline()
self.error_code = self.error_message = None
self.parse_request()
def send_error(self, code, message):
self.error_code = code
self.error_message = message
class CDNProxy(Thread):
def __init__(self, sock, addr, ip):
global read_ip
Thread.__init__(self)
self.client = sock
self.addr = addr
print 'Connection from', addr, 'to CDN'
def run(self):
global running
cli = self.client
req = HTTPRequest(cli)
req.path = urllib.quote("/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Csource%2Calgorithm%2Cburst%2Cfactor%2Ccp&fexp=900081&algorithm=throttle-factor&itag=34&ip=90.0.0.0&burst=40&sver=3&signature=CF95846B1987992E985924FB529D8B22AEB43FC8.AA4E2CD9FD6331D2F952F9C695E16D6B3CD166E9&source=youtube&expire=1328078746&key=yt1&ipbits=8&factor=1.25&cp=U0hRTVBSVl9JUENOMV9ITFpIOk5walczM1pvOTFB&id=a078394896111c0d&redirect_counter=1")
st = '%s %s %s\r\n%s\r\n\r\n' % (req.command, req.path, req.request_version, str(req.headers))
#print [st]
#srv.send(st)
# ignore request, acquire rickroll
global rickroll
data = copy(rickroll)
while len(data) > 0 and running:
rd, wd, xd = select([], [cli], [], 1)
if cli not in wd: continue
n = cli.send(data)
data = data[n:]
print 'Connection terminated'
cli.close()
class WWWProxy(Thread):
def __init__(self, sock, addr, ip):
global read_ip
Thread.__init__(self)
self.client = sock
self.addr = addr
print 'Connection from', addr, 'to youtube.com/ytimg.com'
# connect to real server
ip = random.choice(ip)
self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.server.connect((ip, 80))
def proxy(self, src, dst):
data = src.recv(4096)
size = len(data)
if size == 0:
return False
while len(data) > 0:
n = dst.send(data)
data = data[n:]
return True
def run(self):
global running
cli = self.client
srv = self.server
while running:
rd, wd, xd = select([cli, srv], [], [], 1)
if cli in rd and not self.proxy(cli, srv):
break
if srv in rd and not self.proxy(srv, cli):
break
print 'Connection terminated'
cli.close()
srv.close()
def sigint_handler(*args):
global running
running = False
signal(SIGINT, sigint_handler)
pairs = [
('0.0.0.0', 13254, youtube, WWWProxy),
('0.0.0.0', 13253, cdn, CDNProxy)]
class derp(object):
pass
sock = []
for p in pairs:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(p[:2])
s.listen(5)
x = derp()
x.sock = s
x.fileno = s.fileno
x.proxy_ip = p[2]
x.factory = p[3]
sock.append(x)
while True:
rd,wd,xd = select(sock, [], [], 1)
for s in rd:
x = s.factory(ip=s.proxy_ip, *s.sock.accept())
x.start()
</codebox>
Instead of changing the request I downloaded the rickroll response (including headers,e.g. <tt>curl -i URL</tt>) to a file called {{Filename|rickroll}} which is sent to the client.
This script could be improved in may ways but as a proof-of-concept it is enough.
[[Category:Linux]]
6424d373d6b7ace7dcee4614b7e39bc66168c53f
2651
2012-02-01T22:19:32Z
EXt
1
Created page with "<youtube size="380x213" frame>_O6o5e-PpRs</youtube> Inspired by [http://www.ex-parrot.com/~pete/upside-down-ternet.html Upside-Down-Ternet] I created a similar setup which replac..."
wikitext
text/x-wiki
<youtube size="380x213" frame>_O6o5e-PpRs</youtube>
Inspired by [http://www.ex-parrot.com/~pete/upside-down-ternet.html Upside-Down-Ternet] I created a similar setup which replaces all youtube videos with Rick Astley's “Never Gonna Give You Up.” aka rickroll. It won't work for HTTPS, at least not without getting certificate failures. It works by first hijacking connections to the content delivery networks, discards your requests and inserts rickrolls instead. This setups also hijacks youtube.com and ytimg.com requests but only proxies to a real server, in retrospect I realized it wasn't necessary but I present the solution as it was when I made it.
== DNS config ==
<codebox lang="text" title="named.conf">
# youtube hijack proxy
zone "youtube.com" IN {
type master;
file "pri/youtube.zone";
};
zone "ytimg.com" {
type master;
file "pri/ytimg.zone";
};
</codebox>
<codebox lang="text" title="pri/youtube.zone" highlight="4">
$ORIGIN youtube.com.
@ IN A 10.13.37.254
www IN A 10.13.37.254
*.c IN A 10.13.37.253
</codebox>
<codebox lang="text" title="pri/ytimg.zone">
$ORIGIN ytimg.com.
@ IN A 10.13.37.254
s IN A 10.13.37.254
i1 IN A 10.13.37.254
i2 IN A 10.13.37.254
i3 IN A 10.13.37.254
i4 IN A 10.13.37.254
</codebox>
Please note that *.c.youtube.com is redirected to a different IP!
== iptables ==
<codebox lang="bash">
iptables -A PREROUTING -t nat -d 10.13.37.254/32 -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 13254
iptables -A PREROUTING -t nat -d 10.13.37.253/32 -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 13253
</codebox>
You can redirect to another host if you want, I chose to only redirect port as I was already running apache on port 80.
== script ==
<codebox lang="python" filename="fulhack.py">
#!/usr/bin/env python
# -*- coding: utf-8; -*-
import socket
import sys
import random
import urllib
from copy import copy
from signal import signal, SIGINT
from threading import Thread
from select import select
from httplib import HTTPResponse
from BaseHTTPServer import BaseHTTPRequestHandler
youtube = [
'173.194.32.0',
'173.194.32.1',
'173.194.32.2',
'173.194.32.3',
'173.194.32.4',
'173.194.32.5',
'173.194.32.6',
'173.194.32.7',
'173.194.32.8',
'173.194.32.9',
'173.194.32.10',
'173.194.32.11',
'173.194.32.12',
'173.194.32.13',
'173.194.32.14',
'173.194.32.15']
cdn = []
rickroll = open('./rickroll').read()
running = True
class HTTPRequest(BaseHTTPRequestHandler):
def __init__(self, sock):
self.rfile = sock.makefile("rb")
self.raw_requestline = self.rfile.readline()
self.error_code = self.error_message = None
self.parse_request()
def send_error(self, code, message):
self.error_code = code
self.error_message = message
class CDNProxy(Thread):
def __init__(self, sock, addr, ip):
global read_ip
Thread.__init__(self)
self.client = sock
self.addr = addr
print 'Connection from', addr, 'to CDN'
def run(self):
global running
cli = self.client
req = HTTPRequest(cli)
req.path = urllib.quote("/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Csource%2Calgorithm%2Cburst%2Cfactor%2Ccp&fexp=900081&algorithm=throttle-factor&itag=34&ip=90.0.0.0&burst=40&sver=3&signature=CF95846B1987992E985924FB529D8B22AEB43FC8.AA4E2CD9FD6331D2F952F9C695E16D6B3CD166E9&source=youtube&expire=1328078746&key=yt1&ipbits=8&factor=1.25&cp=U0hRTVBSVl9JUENOMV9ITFpIOk5walczM1pvOTFB&id=a078394896111c0d&redirect_counter=1")
st = '%s %s %s\r\n%s\r\n\r\n' % (req.command, req.path, req.request_version, str(req.headers))
#print [st]
#srv.send(st)
# ignore request, acquire rickroll
global rickroll
data = copy(rickroll)
while len(data) > 0 and running:
rd, wd, xd = select([], [cli], [], 1)
if cli not in wd: continue
n = cli.send(data)
data = data[n:]
print 'Connection terminated'
cli.close()
class WWWProxy(Thread):
def __init__(self, sock, addr, ip):
global read_ip
Thread.__init__(self)
self.client = sock
self.addr = addr
print 'Connection from', addr, 'to youtube.com/ytimg.com'
# connect to real server
ip = random.choice(ip)
self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.server.connect((ip, 80))
def proxy(self, src, dst):
data = src.recv(4096)
size = len(data)
if size == 0:
return False
while len(data) > 0:
n = dst.send(data)
data = data[n:]
return True
def run(self):
global running
cli = self.client
srv = self.server
while running:
rd, wd, xd = select([cli, srv], [], [], 1)
if cli in rd and not self.proxy(cli, srv):
break
if srv in rd and not self.proxy(srv, cli):
break
print 'Connection terminated'
cli.close()
srv.close()
def sigint_handler(*args):
global running
running = False
signal(SIGINT, sigint_handler)
pairs = [
('0.0.0.0', 13254, youtube, WWWProxy),
('0.0.0.0', 13253, cdn, CDNProxy)]
class derp(object):
pass
sock = []
for p in pairs:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(p[:2])
s.listen(5)
x = derp()
x.sock = s
x.fileno = s.fileno
x.proxy_ip = p[2]
x.factory = p[3]
sock.append(x)
while True:
rd,wd,xd = select(sock, [], [], 1)
for s in rd:
x = s.factory(ip=s.proxy_ip, *s.sock.accept())
x.start()
</codebox>
Instead of changing the request I downloaded the rickroll response (including headers,e.g. <tt>curl -i URL</tt>) to a file called {{Filename|rickroll}} which is sent to the client.
This script could be improved in may ways but as a proof-of-concept it is enough.
2eebdddf1ac1a7a6e437ab78ce22429ccbbd2576
Talk:GRUB: Boot another OS once
1
1499
2406
2010-10-24T20:14:46Z
EXt
1
moving comment to talk page and adding reply.
wikitext
text/x-wiki
== Renew this Article ==
Hi there, please re-weite this article, because it is old in any way. Have a look at the command "grubonce". This is the preferred way to reboot into another installed OS for just the next reboot. -- Anon (84.130.168.212) 17:44, 24 October 2010
:: "grubonce" is not a part of grub and is not available on all systems (e.g. gentoo) --[[User:EXt|EXt]] 20:14, 24 October 2010 (UTC)
e5a61e1758ba3cd446670c4c9e57b5f3d0354e53
Talk:GRUB: Restore GRUB
1
1492
2618
2614
2012-01-27T12:56:14Z
EXt
1
moved [[Talk:Grub: Restore GRUB]] to [[Talk:GRUB: Restore GRUB]]: derp
wikitext
text/x-wiki
:NOTE: This doesn't work and XP WILL NOT BOOT, AUTHOR IS OBVIOUSLY TALKING OUT THEIR ASS AND HAS NEVER ACTUALLY DONE THIS. --[[User talk:76.194.9.64|76.194.9.64]]
::I'm not sure whenever you're talking about reinstalling grub or finding the right partition. I've reinstalled grub a numerous times for different reasons and that is the technique, more or less. --[[User:EXt|EXt]] 18:04, 4 March 2009 (GMT)
1578bbe45cbd328e1251851d37020a92ce9e37c3
2614
2319
2012-01-27T12:53:51Z
EXt
1
moved [[Talk:HOWTO Restore GRUB after Windows XP installation-cd]] to [[Talk:Grub: Restore GRUB]]: Consistent naming
wikitext
text/x-wiki
:NOTE: This doesn't work and XP WILL NOT BOOT, AUTHOR IS OBVIOUSLY TALKING OUT THEIR ASS AND HAS NEVER ACTUALLY DONE THIS. --[[User talk:76.194.9.64|76.194.9.64]]
::I'm not sure whenever you're talking about reinstalling grub or finding the right partition. I've reinstalled grub a numerous times for different reasons and that is the technique, more or less. --[[User:EXt|EXt]] 18:04, 4 March 2009 (GMT)
1578bbe45cbd328e1251851d37020a92ce9e37c3
2319
2009-03-04T18:04:18Z
EXt
1
New page: :NOTE: This doesn't work and XP WILL NOT BOOT, AUTHOR IS OBVIOUSLY TALKING OUT THEIR ASS AND HAS NEVER ACTUALLY DONE THIS. --[[User talk:76.194.9.64|76.194.9.64]] ::I'm not sure whenever y...
wikitext
text/x-wiki
:NOTE: This doesn't work and XP WILL NOT BOOT, AUTHOR IS OBVIOUSLY TALKING OUT THEIR ASS AND HAS NEVER ACTUALLY DONE THIS. --[[User talk:76.194.9.64|76.194.9.64]]
::I'm not sure whenever you're talking about reinstalling grub or finding the right partition. I've reinstalled grub a numerous times for different reasons and that is the technique, more or less. --[[User:EXt|EXt]] 18:04, 4 March 2009 (GMT)
1578bbe45cbd328e1251851d37020a92ce9e37c3
Talk:Grub: Restore GRUB
1
1579
2619
2012-01-27T12:56:14Z
EXt
1
moved [[Talk:Grub: Restore GRUB]] to [[Talk:GRUB: Restore GRUB]]: derp
wikitext
text/x-wiki
#REDIRECT [[Talk:GRUB: Restore GRUB]]
2c42fc511dfddd31109e5ff6c5895384b1096d55
Talk:HOWTO Restore GRUB after Windows XP installation-cd
1
1577
2615
2012-01-27T12:53:51Z
EXt
1
moved [[Talk:HOWTO Restore GRUB after Windows XP installation-cd]] to [[Talk:Grub: Restore GRUB]]: Consistent naming
wikitext
text/x-wiki
#REDIRECT [[Talk:Grub: Restore GRUB]]
822998838856092171c558dd62048fd326eb5569
Talk:Main Page
1
1437
2488
2171
2011-03-09T14:11:14Z
80.25.232.213
0
/* Site Title */
wikitext
text/x-wiki
==Site Title==
''"The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word."''
I think the closest word in English would be crosswind. [[User:81.23.56.12|81.23.56.12]] 06:12, 30 January 2008 (GMT) (a fellow game programmer :) )
==Thanks==
Hi, I just wanted to thank you very much for this wiki ;-)
19243b887832d5554b91fa6b3b16bd1be430797c
2171
2008-01-30T06:12:45Z
81.23.56.12
0
Sidvind in English
wikitext
text/x-wiki
==Site Title==
''"The name of the site is Sidvind which is a Swedish word for wind that comes from a side (like when you drive the car and the wind blows from the right). AFAIK there isn't an English equivalent word."''
I think the closest word in English would be crosswind. [[User:81.23.56.12|81.23.56.12]] 06:12, 30 January 2008 (GMT) (a fellow game programmer :) )
f6156005b7d3e006058f35ff0313d14ed1069b2a
Talk:Thunderbird/Change account order
1
1837
3056
2016-06-11T22:16:53Z
Skitar
2929
37 email accounts need extra work.
wikitext
text/x-wiki
I have 37 email accounts in Thunderbird. Accounts number 1 (account1) and number 27 (account27) have usernames of "nobody", but do not show up in the left panel. I re-ordered my accounts using the method described, but left out account1 and account27 and it didn't work correctly. Adding account1 back as the first on the list, and adding account27 back as the 27th on the list made everything work OK. Account1 and account27 did NOT show up in the left panel, only my 37 email accounts did, even though there were actually 39 on the list, counting 1 and 27. Not having account27 in the list at the 27th position would cause another of my email accounts to not show up in the left panel. I left the Local Folders in the last position.
Should this be documented on the main wiki page?
Maybe someone should try to duplicate this first?
Thanks for the main wiki page! This helped a lot, even though it took some experimenting to get mine correct.
7aeeabfc3c734e90bbaf05b6303e9b3bfa299a3e
Talk:Xargs by example
1
1442
2191
2008-03-29T14:45:56Z
83.250.91.22
0
New page: Coolt att sidvind är första googleträffen på xargs example =) /slafs
wikitext
text/x-wiki
Coolt att sidvind är första googleträffen på xargs example =) /slafs
72bcf9cb522da10caa21aab4fa67688b64f404b6
User:Erline
2
1562
2556
2011-08-03T06:27:43Z
Erline
157
moved [[User:Erline]] to [[E cigarette reviews]]
wikitext
text/x-wiki
#REDIRECT [[E cigarette reviews]]
d9250687fdd005da4670facaf0daa1cebd232d9b
User:Stampnitzky16
2
1560
2553
2011-08-03T05:54:15Z
Stampnitzky16
156
moved [[User:Stampnitzky16]] to [[E cig]]
wikitext
text/x-wiki
#REDIRECT [[E cig]]
06249ec8b9d67067aab3ee1f8fc7c3064e14a463
User:VictoriMAL
2
1830
3029
3028
2015-05-13T23:44:34Z
VictoriMAL
2869
wikitext
text/x-wiki
I like Fencing. <br>I to learn Hindi in my spare time.
0efcd3930a81a7a99d26a92083b8e471db05d7e9
3028
3027
2015-05-13T22:16:43Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello from France. I'm glad to be here. My first name is Christopher. <br>I live in a city called Tarbes in south France.<br>I was also born in Tarbes 20 years ago. Married in May year 2006. I'm working at the university.
c29b4971317da3294064b8a7a36741fba9b7a1d7
3027
3026
2015-05-13T17:33:54Z
VictoriMAL
2869
wikitext
text/x-wiki
I like Coin collecting. Appears boring? Not!<br>I also try to learn Russian in my spare time.
843293646b6d8e90edbe5d20b12f4a6eafb3dd10
3026
3025
2015-05-13T16:07:48Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm a 37 years old, married and work at the high school (Chinese Studies).<br>In my free time I learn Portuguese. I've been there and look forward to returning anytime soon. I like to read, preferably on my kindle. I really love to watch NCIS and Supernatural as well as docus about anything scientific. I like Cooking.
ed5627825c374446d5374292933a790c238e33fe
3025
3024
2015-05-13T07:19:26Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello from United Kingdom. I'm glad to came across you. My first name is Eulah. <br>I live in a small town called Buckfast in east United Kingdom.<br>I was also born in Buckfast 39 years ago. Married in April year 2009. I'm working at the university.
d54611942e83a0410dbcf5091c66245e5aa912cb
3024
3023
2015-05-13T06:52:05Z
VictoriMAL
2869
wikitext
text/x-wiki
My hobby is mainly Amateur astronomy. <br>I try to learn Danish in my free time.
a2dc22d6e4c4b6f36b29d7d840f7bae41bf0ee20
3023
3022
2015-05-12T23:55:45Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello, dear friend! My name is Mac. I smile that I can unite to the entire globe. I live in Great Britain, in the NA region. I dream to go to the various countries, to obtain acquainted with interesting people.
f60af0070e79eca9bbfc918345c594630f894d0f
3022
3021
2015-05-12T21:56:20Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello, I'm Betsy, a 30 year old from Sant'andrea Di Campodarsego, Italy.<br>My hobbies include (but are not limited to) Dog sport, Vintage Books and watching NCIS.
d46b265b74575622ddce007e9fbee0dc4bc66520
3021
3020
2015-05-12T20:16:31Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! <br>I'm Italian female :D. <br>I really love Grey's Anatomy!
aef3693829684638ef2007a3755f464ba5f93f90
3020
3019
2015-05-12T16:55:44Z
VictoriMAL
2869
wikitext
text/x-wiki
I am 22 years old and my name is Josefa Taulbee. I life in Pontoise (France).
af23a863e5c0e5a7eefe2d04843eb75841590784
3019
3018
2015-05-11T23:15:12Z
VictoriMAL
2869
wikitext
text/x-wiki
I’m Gennie from Adorf doing my final year engineering in Education Science. I did my schooling, secured 89% and hope to find someone with same interests in Vintage Books.
f6d3780d49b5d1eb36302ef2f68c9198201c8f2d
3018
3017
2015-05-11T16:02:13Z
VictoriMAL
2869
wikitext
text/x-wiki
My name's Muhammad Penson but everybody calls me Muhammad. I'm from Netherlands. I'm studying at the university (2nd year) and I play the Cello for 8 years. Usually I choose songs from my famous films :D. <br>I have two sister. I love Sewing, watching movies and Taxidermy.
df3df6a14641256fa15a8472f3327b76e250278e
3017
3016
2015-05-11T09:18:08Z
VictoriMAL
2869
wikitext
text/x-wiki
Name: Fawn Galarza<br>Age: 25<br>Country: Australia<br>City: Westgrove <br>Postal code: 4454<br>Address: 64 Cunningham Street
98db18e03a604e5e79c3066abb72e26516030a21
3016
3015
2015-05-11T01:48:07Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello, I'm Barry, a 30 year old from Zwolle, Netherlands.<br>My hobbies include (but are not limited to) Locksport, Target Shooting and watching Psych.
34f677d9e5b48aa9b0e671157e27fbe7205a079f
3015
3014
2015-05-10T16:50:23Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi, everybody! <br>I'm Korean female :). <br>I really like Petal collecting and pressing!
4a1eef15822012f76990c5ab85bb8a54e5f1a3db
3014
3013
2015-05-10T14:43:59Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi there! :) My name is Oren, I'm a student studying Architecture from Blumau, Austria.
37128413b5aacd8606f8919f627c63e82e15cf22
3013
3012
2015-05-10T13:32:16Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm a 38 years old and work at the university (Anthropology and Sociology).<br>In my spare time I'm trying to learn Vietnamese. I have been twicethere and look forward to go there anytime soon. I love to read, preferably on my beloved Kindle. I really love to watch American Dad and NCIS as well as docus about anything geological. I like Photography.
43fc609a04cc19ad8f324f530bf87e88ba3a39d7
3012
3011
2015-05-10T10:26:40Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi there! :) My name is Heriberto, I'm a student studying Theatre from Fort Worth, United States.
1c08ff32080220afc21dbe50ef2b80a45c6f67f6
3011
3010
2015-05-10T08:10:25Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Rebekah and I live in Geleen. <br>I'm interested in Law, Vehicle restoration and Norwegian art. I like to travel and reading fantasy.
b6336085a2dc558b596bdc676c0e52bdee4d69e0
3010
3009
2015-05-10T00:43:45Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Della and I am studying Comparative Politics and Dramatic Literature and History at Su?Avik / Iceland.
e04fad4ecdc1b80a1b6a9e30fb151b1a609f002c
3009
3008
2015-05-09T21:51:04Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Kieran (31) from Warszawa, Poland. <br>I'm learning Hindi literature at a local high school and I'm just about to graduate.<br>I have a part time job in a the office.
52aa373ab259bc3f14a76e533063512605984962
3008
3007
2015-05-09T19:32:10Z
VictoriMAL
2869
wikitext
text/x-wiki
My name: Shawn Lerner<br>Age: 25 years old<br>Country: Denmark<br>Home town: Kobenhavn K <br>ZIP: 1304<br>Street: Svendborg Landevej 55
02760276f1e9a8588c1993b327823b8d3bd7dda2
3007
3006
2015-05-09T16:16:42Z
VictoriMAL
2869
wikitext
text/x-wiki
Name: Kellee Gale<br>My age: 29<br>Country: France<br>City: Perpignan <br>Postal code: 66100<br>Street: 2 Rue Clement Marot
7b0d0ee154d9d0d83cbbeb1b6ebb2267eed88460
3006
3005
2015-05-09T13:25:47Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Antje Frantz but everybody calls me Antje. I'm from Australia. I'm studying at the college (final year) and I play the Guitar for 3 years. Usually I choose songs from the famous films ;). <br>I have two brothers. I love Shortwave listening, watching TV (Arrested Development) and Reading.
0752cbf302fd6de70f1c2a4fd8b0bc0e7d2ff9ce
3005
3004
2015-05-09T11:51:22Z
VictoriMAL
2869
wikitext
text/x-wiki
I like my hobby Singing. <br>I also try to learn Japanese in my spare time.
a3b70e93b666adb67b3b64b47f38a6af3afca1d5
3004
3003
2015-05-09T02:18:07Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! My name is Weldon. <br>It is a little about myself: I live in Switzerland, my city of Igis. <br>It's called often Eastern or cultural capital of NA. I've married 2 years ago.<br>I have two children - a son (Noemi) and the daughter (Edythe). We all like Rock climbing.
6753a9f19b4ab0b0ce96afaf4e4e708054f08bfd
3003
3002
2015-05-08T23:17:04Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm a 30 years old, married and working at the university (Nursing).<br>In my spare time I try to teach myself English. I have been there and look forward to returning anytime soon. I love to read, preferably on my ipad. I really love to watch The Big Bang Theory and Breaking Bad as well as documentaries about anything astronomical. I enjoy Motor sports.
ff57539b292dcb56f576cf19413b0449f75f26af
3002
3001
2015-05-08T22:23:14Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! <br>I'm Hindi male :D. <br>I really like Cooking!
f2b93bb66f8b8807489169fe688c8cb4851be934
3001
3000
2015-05-08T21:19:03Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello from France. I'm glad to came across you. My first name is Christel. <br>I live in a small town called Marseille in western France.<br>I was also born in Marseille 26 years ago. Married in September year 1999. I'm working at the the office.
b2b7ffa994cc9c2fad89bc625bd6cf8319b3364d
3000
2999
2015-05-08T04:24:54Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Gene and I am studying Asian Studies and Physical at Fouron-Saint-Pierre / Belgium.
d6b6348a6d45961ed091a61e5083a542da6c0994
2999
2998
2015-05-07T23:49:28Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Carol and I live in Tervuren. <br>I'm interested in English Literature, Rock collecting and Russian art. I like travelling and watching Arrested Development.
e00ecd5ec9c4bb3b5b5994e091460e190c672b65
2998
2997
2015-05-07T06:19:07Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Emelia Kittelson. I life in Vitoria (Brazil).
04c7ccac38e617c85f5a5f75b25ee486f7e39e76
2997
2996
2015-05-06T19:31:44Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Xavier Como but everybody calls me Xavier. I'm from France. I'm studying at the high school (3rd year) and I play the Saxhorn for 5 years. Usually I choose music from the famous films :). <br>I have two brothers. I like Table football, watching TV (Breaking Bad) and Cycling.
c4553ce8856b8fdd61586cef955c0dc62de0afa2
2996
2995
2015-05-06T14:53:55Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Liza from Seattle studying Human Ecology. I did my schooling, secured 70% and hope to find someone with same interests in Vintage car.
ce501beccfe3b780ab7e8f6e3c886901a4b2d2b4
2995
2994
2015-05-05T14:56:04Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Gabrielle and was born on 14 June 1981. My hobbies are Locksport and Sailing.
39dafaf1a8722eb0254dea4915807f6450cc2418
2994
2993
2015-05-05T13:45:04Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Brook (24) from Marrangaroo, Australia. <br>I'm learning Portuguese literature at a local university and I'm just about to graduate.<br>I have a part time job in a college.
75febfa1f331a3c05b07310b68082ec4d8372704
2993
2992
2015-05-04T20:11:16Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Janine (21 years old) and my hobbies are Stone collecting and Scrapbooking.
dd0242d601dd2c55f35ac35b84a8f3d4f4cae05a
2992
2991
2015-05-03T16:58:43Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! I am Clifford. I am delighted that I could join to the entire globe. I live in Austria, in the south region. I dream to see the various countries, to obtain acquainted with appealing people.
4f8c5d46c801ad5c9d91664ae541f5eb62cc1d30
2991
2990
2015-05-03T13:13:26Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! <br>My name is Sonia and I'm a 23 years old boy from United Kingdom.
1620281169565277228acd01b280c077ca8298d8
2990
2989
2015-05-03T08:51:33Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Federico (47 years old) and my hobbies are Auto racing and Swimming.
d46cf0872e1c1c759eba4d8407f71e795db62e23
2989
2988
2015-05-03T05:46:17Z
VictoriMAL
2869
wikitext
text/x-wiki
I am Tammy from Kobenhavn V. I am learning to play the Guitar. Other hobbies are Tennis.
58e836c9594e8a14cb0aad1ebfba8d240be8c51a
2988
2987
2015-05-03T00:43:07Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello, I'm Muriel, a 25 year old from Stretton, United Kingdom.<br>My hobbies include (but are not limited to) Amateur geology, Musical instruments and watching Grey's Anatomy.
ae1680483440f9ed3936054eb5a42bc83b6cf93f
2987
2986
2015-05-02T19:06:44Z
VictoriMAL
2869
wikitext
text/x-wiki
I like my hobby Tai Chi. <br>I also to learn Norwegian in my free time.
ff57045bca747084eaf9f704fe27a6298fa8534c
2986
2985
2015-05-01T21:19:52Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello, I'm Guillermo, a 19 year old from Nancy, France.<br>My hobbies include (but are not limited to) Basketball, Vintage Books and watching Family Guy.
57d24ac3527971e001d91791a8de9bac1f1e02ca
2985
2984
2015-05-01T18:59:37Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Brianne and I live in a seaside city in northern Denmark, Kobenhavn V. I'm 36 and I'm will soon finish my study at Theatre.
e22060c1200dc26fa383d18bd1bde9677766459f
2984
2983
2015-05-01T01:47:16Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! My name is Nick. <br>It is a little about myself: I live in Great Britain, my city of Pitton. <br>It's called often Northern or cultural capital of NA. I've married 1 years ago.<br>I have 2 children - a son (Reina) and the daughter (Denisha). We all like Metal detecting.
1d2e40983880dc6aff83bee4e6220f365b675ccd
2983
2982
2015-04-30T16:27:52Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Mandy and I live in Unter-Sankt Georgen. <br>I'm interested in Earth Sciences, Herpetoculture and Dutch art. I like travelling and watching NCIS.
a0e846f0c727019bb54a66d4eff1c76d035b349f
2982
2981
2015-04-30T01:36:32Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi there! :) My name is Glenna, I'm a student studying Film Studies from Todenham, Great Britain.
61a4b5b5e11239be4bbdd36784a9a5ce0fcb1d59
2981
2980
2015-04-29T16:43:32Z
VictoriMAL
2869
wikitext
text/x-wiki
My name: Alda Duval<br>My age: 36 years old<br>Country: Poland<br>Home town: Katowice <br>Post code: 40-266<br>Street: Al. Murckowska 32
9c88839eef9790b8623d52c118f0a6425ec3c7b8
2980
2979
2015-04-29T12:29:54Z
VictoriMAL
2869
wikitext
text/x-wiki
I like Rugby league football. <br>I try to learn German in my free time.
32793d712851a5276958618a79c24ff692741bc0
2979
2978
2015-04-29T00:54:24Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm a 40 years old, married and study at the high school (Dance).<br>In my free time I try to learn Dutch. I've been twicethere and look forward to returning sometime in the future. I like to read, preferably on my ipad. I really love to watch The Vampire Diaries and The Big Bang Theory as well as docus about anything technological. I enjoy Vintage car.
0ea02e5d106fdb70f761bf224fcdc0d2b84b4a61
2978
2977
2015-04-22T09:45:46Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Addie Tibbs. I life in Sao Paulo (Brazil).
3e506cf4561ec0b7d8236d6be04ec11523e7454a
2977
2976
2015-04-21T20:00:52Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi, everybody! My name is Christoper. <br>It is a little about myself: I live in Italy, my city of Santa Maria Della Versa. <br>It's called often Eastern or cultural capital of PV. I've married 3 years ago.<br>I have 2 children - a son (Guadalupe) and the daughter (Janessa). We all like Roller Derby.
859ad4c7f20278cbfe0275e39ff786982a0954aa
2976
2975
2015-04-21T17:34:54Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello from France. I'm glad to came here. My first name is Myra. <br>I live in a small town called Lyon in east France.<br>I was also born in Lyon 23 years ago. Married in February year 2010. I'm working at the college.
9a1874d7eb67cb0fbd9f68ba6fc6d96ce4282d9b
2975
2974
2015-04-19T12:41:32Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Nigel Keefe. I life in Warmenhuizen (Netherlands).
d033a54e8629618ab9febbbc77219a171ec34bad
2974
2973
2015-04-19T09:09:56Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello! My name is Chadwick. I smile that I could unify to the entire globe. I live in Brazil, in the MG region. I dream to visit the different nations, to look for acquainted with appealing people.
351c2436394ea6c4b803a1102dc467b6d9b38a10
2973
2972
2015-04-19T05:21:39Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Trista from Sao Goncalo doing my final year engineering in Educational Studies. I did my schooling, secured 74% and hope to find someone with same interests in Sculling or Rowing.
644a4df83c086d299a79d8f2e1164d63fdd57774
2972
2971
2015-04-18T17:46:22Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Lesley and I am studying Theatre and Journalism at Den Helder / Netherlands.
8911f9a31277f49383c7a7e29abddc1079377d89
2971
2970
2015-04-18T08:43:23Z
VictoriMAL
2869
wikitext
text/x-wiki
I'm Terrie and was born on 4 July 1986. My hobbies are Taxidermy and Mountain biking.
61c7ffe3eb4d76f226d1f5dc3444b54e56531aaf
2970
2969
2015-04-17T05:53:24Z
VictoriMAL
2869
wikitext
text/x-wiki
My name is Everette and I am studying Psychology and Biochemistry at Militello In Val Di Catania / Italy.
a25a3c2fbdc9409878786a5779a965d2c7048af4
2969
2968
2015-04-15T11:52:40Z
VictoriMAL
2869
wikitext
text/x-wiki
Hello from France. I'm glad to be here. My first name is Rosaline. <br>I live in a city called Tarbes in nothern France.<br>I was also born in Tarbes 24 years ago. Married in December 2010. I'm working at the university.
0801fd18c60a53529ec05dc04a06d0844d6d5a35
2968
2967
2015-04-14T13:46:37Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi there! :) My name is Hope, I'm a student studying Greek and Roman Culture from Melawondi, Australia.
0e3ec55492b62a396e445956a62d124c017a89ca
2967
2966
2015-04-14T09:15:13Z
VictoriMAL
2869
wikitext
text/x-wiki
Hi! <br>My name is Opal and I'm a 25 years old girl from Bergen.
eb798a781679313abc50d97c35c53f5e3089fb01
2966
2015-04-13T22:09:30Z
VictoriMAL
2869
Created page with "I'm Jonathan and I live in Nurnberg. <br>I'm interested in Art, Creative writing and Portuguese art. I like travelling and reading fantasy."
wikitext
text/x-wiki
I'm Jonathan and I live in Nurnberg. <br>I'm interested in Art, Creative writing and Portuguese art. I like travelling and reading fantasy.
a5812ac8bb75294e4b723454aa00e34d0ea72d6c
Sidvind:About
4
1432
2138
2007-11-19T17:06:12Z
EXt
1
New page: Admin/Webmaster/Owner/Whatver: [mailto:wiki@sidvind.com wiki@sidvind.com]
wikitext
text/x-wiki
Admin/Webmaster/Owner/Whatver: [mailto:wiki@sidvind.com wiki@sidvind.com]
2febf25b0196aba6ec9ce7441742f0c9979943fb
Sidvind:Site support
4
1401
2325
2324
2009-05-07T07:09:58Z
EXt
1
Reverted edits by [[Special:Contributions/72.22.177.232|72.22.177.232]] ([[User talk:72.22.177.232|Talk]]); changed back to last version by [[User:EXt|EXt]]
wikitext
text/x-wiki
I am studying game development in Sweden and as most of you probably know students are broke most of the time. Bandwidth and hardware costs a bit. I am writing at this page in my spare time and I hope it will gain more content over time. If you like and/or use this site please consider donating a small amount of money. To donate press the PayPal button to the left.
24ebf661947827a587b363286e3a2d45210fb62e
2324
1989
2009-05-07T03:08:23Z
72.22.177.232
0
wikitext
text/x-wiki
I am studying game development in Sweden and as most of you probably know students are broke most of the time. Bandwidth and hardware costs a bit. I am writing at this page in my spare time and I hope it will gain more content over time. If you like and/or use this site please consider donating a small amount of money. To donate press the PayPal button to the left.
Hello, really?
c5198e5c130f1b38f5f6c7c4b28b882a6d3793af
1989
2006-07-31T19:32:50Z
EXt
1
wikitext
text/x-wiki
I am studying game development in Sweden and as most of you probably know students are broke most of the time. Bandwidth and hardware costs a bit. I am writing at this page in my spare time and I hope it will gain more content over time. If you like and/or use this site please consider donating a small amount of money. To donate press the PayPal button to the left.
24ebf661947827a587b363286e3a2d45210fb62e
File:CMake-logo.png
6
1446
2206
2205
2008-05-10T23:29:03Z
EXt
1
wikitext
text/x-wiki
Low resolution version of http://www.cmake.org/files/logos/CMake-logo-triangle-high-res.png.
a4e719f89b6834abb639de021b118d2fbbbc8fe3
2205
2008-05-10T23:28:36Z
EXt
1
Low resolution version of [http://www.cmake.org/files/logos/CMake-logo-triangle-high-res.png].
wikitext
text/x-wiki
Low resolution version of [http://www.cmake.org/files/logos/CMake-logo-triangle-high-res.png].
c6c4c4baf62e3c80bbb69a108300daabd6994731
File:Enigmail-01.png
6
1453
2237
2008-06-17T12:21:50Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-02.png
6
1454
2238
2008-06-17T12:21:56Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-03.png
6
1455
2239
2008-06-17T12:23:18Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-04.png
6
1456
2240
2008-06-17T12:23:23Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-05.png
6
1457
2241
2008-06-17T12:23:27Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-06.png
6
1458
2242
2008-06-17T12:23:31Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-07.png
6
1459
2243
2008-06-17T12:23:36Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-08.png
6
1460
2244
2008-06-17T12:23:41Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-09.png
6
1461
2245
2008-06-17T12:24:40Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-10.png
6
1462
2246
2008-06-17T12:24:45Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-11.png
6
1463
2247
2008-06-17T12:24:49Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-12.png
6
1464
2248
2008-06-17T12:24:54Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-13.png
6
1465
2249
2008-06-17T12:24:58Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-14.png
6
1466
2250
2008-06-17T12:25:05Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-15.png
6
1467
2251
2008-06-17T12:25:10Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-16.png
6
1468
2252
2008-06-17T12:25:15Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-17.png
6
1469
2253
2008-06-17T12:25:20Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-18.png
6
1470
2254
2008-06-17T12:25:25Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-19.png
6
1471
2255
2008-06-17T12:26:52Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-20.png
6
1472
2256
2008-06-17T12:26:57Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-21.png
6
1473
2257
2008-06-17T12:27:02Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-22.png
6
1474
2258
2008-06-17T12:27:06Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-23.png
6
1475
2259
2008-06-17T12:27:10Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-24.png
6
1476
2260
2008-06-17T12:27:19Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-25.png
6
1477
2261
2008-06-17T12:27:24Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-26.png
6
1478
2262
2008-06-17T12:27:29Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-27.png
6
1479
2263
2008-06-17T12:27:33Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Enigmail-28.png
6
1480
2264
2008-06-17T12:27:38Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Glogo-small.png
6
1422
2087
2006-11-09T15:11:40Z
Chris
7
Gentoo logotype
wikitext
text/x-wiki
Gentoo logotype
00a623e5f3d493b914c663476b33222bdb4fc5c7
File:Go inheritance.png
6
1411
2060
2006-09-24T19:59:44Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Icon Hardware.png
6
1417
2068
2006-09-24T21:07:41Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Icon formula.png
6
1416
2067
2006-09-24T20:54:21Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Icon game.png
6
1415
2065
2006-09-24T20:49:49Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Icon tools.png
6
1413
2063
2006-09-24T20:35:13Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Jordan curve polygon.png
6
1398
1973
2006-07-25T12:12:05Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:NewTux.png
6
1414
2064
2006-09-24T20:47:27Z
EXt
1
NewTux by [http://www.isc.tamu.edu/~lewing/ Larry Ewing]
wikitext
text/x-wiki
NewTux by [http://www.isc.tamu.edu/~lewing/ Larry Ewing]
10fabef34dbdd4fd9dcfd66b89dfa405914cc688
File:Reuse performance.png
6
1408
2039
2006-08-31T18:44:02Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sample.png
6
1394
1960
2006-07-21T14:43:32Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Screenshot-OpenPGP Key Management.png
6
1452
2235
2008-06-17T11:28:52Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey01.png
6
1647
2745
2013-05-15T17:41:14Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey02.png
6
1648
2746
2013-05-15T17:42:10Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey03.png
6
1649
2747
2013-05-15T17:43:03Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey04.png
6
1650
2748
2013-05-15T17:43:31Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey05.png
6
1651
2749
2013-05-15T17:44:48Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey06.png
6
1652
2750
2013-05-15T17:46:12Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey07.png
6
1653
2751
2013-05-15T17:47:27Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey08.png
6
1654
2752
2013-05-15T17:48:11Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey09.png
6
1655
2753
2013-05-15T17:49:04Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey10.png
6
1656
2754
2013-05-15T17:49:43Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey11.png
6
1657
2755
2013-05-15T17:50:33Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Sharekey12.png
6
1658
2756
2013-05-15T17:51:07Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Texture.png
6
1395
1961
2006-07-21T14:44:13Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Yawpitchroll.png
6
1396
1964
2006-07-22T08:55:14Z
EXt
1
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
MediaWiki:Common.css
8
1503
3096
3095
2018-03-02T21:32:09Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
color: #000;
margin: 1em 0 0.5em;
}
.mw-genshibox > p.titlebar {
margin: 0;
padding: 2px;
}
.mw-genshi-shellbox {
background-color: #efefa8;
}
.mw-genshi-codebox {
background-color: #C1FFC1;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Google AdSense */
div#mw-panel #p-googleadsense.portal div.body {
margin-left: 0;
}
div#mw-panel div#p-googleadsense {
padding-top: 2rem;
}
.box {
float: right;
border: 1px solid #000;
background-color: #F9F9F9;
}
41c25e8bf859a6c90007f761681999d90873d88d
3095
3041
2018-03-02T21:30:10Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
color: #000;
margin: 1em 0 0.5em;
}
.mw-genshibox > p.titlebar {
margin: 0;
padding: 2px;
}
.mw-genshi-shellbox {
background-color: #efefa8;
}
.mw-genshi-codebox {
background-color: #C1FFC1;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
div#mw-panel #p-googleadsense.portal div.body {
margin-left: 0;
}
.box {
float: right;
border: 1px solid #000;
background-color: #F9F9F9;
}
b001f96a231bb5ef8c99a437a5a8d01723d67d9f
3041
2957
2015-08-08T01:10:04Z
EXt
1
shellbox
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
color: #000;
margin: 1em 0 0.5em;
}
.mw-genshibox > p.titlebar {
margin: 0;
padding: 2px;
}
.mw-genshi-shellbox {
background-color: #efefa8;
}
.mw-genshi-codebox {
background-color: #C1FFC1;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
#p-googleadsense .pBody {
padding-top: 5px;
text-align: center;
background-color: transparent;
border: 0;
border-top: 1px solid #AAAAAA;
}
.box {
float: right;
border: 1px solid #000;
background-color: #F9F9F9;
}
6d15b70972802736f3ccce73c900e2ecfffe82ce
2957
2956
2013-09-19T15:56:06Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
#p-googleadsense .pBody {
padding-top: 5px;
text-align: center;
background-color: transparent;
border: 0;
border-top: 1px solid #AAAAAA;
}
.box {
float: right;
border: 1px solid #000;
background-color: #F9F9F9;
}
67d1da334badf9466d39db311b80744ba8314d86
2956
2662
2013-09-19T15:55:26Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
#p-googleadsense .pBody {
padding-top: 5px;
text-align: center;
background-color: transparent;
border: 0;
border-top: 1px solid #AAAAAA;
}
.box {
float: right;
border: 1px solid #000;
background-color: F9F9F9;
}
3ffba6a8a29ae5029bddb0e1294eb3de27af43ae
2662
2661
2012-02-06T20:10:53Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
#p-googleadsense .pBody {
padding-top: 5px;
text-align: center;
background-color: transparent;
border: 0;
border-top: 1px solid #AAAAAA;
}
d54ba890162064b718aae3c5a0d9c2eac7a93222
2661
2438
2012-02-06T20:00:24Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
/* Pad Google AdSense box in portlet in sidebar */
#p-googleadsense .pBody {
padding-top: 5px;
text-align: center;
}
8e6da6d2be8e9c3c64d59f338f7a97acbd6c3abf
2438
2437
2010-12-25T17:21:53Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
}
bf8243be29a1485e7ecf6a6ef92b6470bc6eb5ec
2437
2436
2010-12-25T17:15:23Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
padding: 1em;
}
3a111a165d7b552d3d7197da85437f7d3d61cc4d
2436
2435
2010-12-25T17:14:31Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-geshi {
border: 1px dashed #2F6FAB;
}
449f844743d7175c5b779a926601279937120c5b
2435
2434
2010-12-25T17:02:52Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
color: black;
margin-top: 1em;
}
.mw-genshibox pre {
border: 1px dashed #2F6FAB;
padding: 0;
margin: 0;
}
fba5fc5c6a30691c796b2a4cd81196985d22b704
2434
2433
2010-12-25T17:01:34Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
color: black;
margin-top: 1em;
}
.mw-genshibox pre {
background-color: #C1FFC1;
border: 1px dashed #2F6FAB;
padding: 0;
margin: 0;
}
7dc16d617998ba498bac15ad750631d80d743ab3
2433
2432
2010-12-25T17:01:03Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
border: 1px dashed #2F6FAB;
color: black;
margin-top: 1em;
}
.mw-genshibox pre {
padding: 0;
margin: 0;
}
cb6e3873332abab4d37c8749e665117387080ebc
2432
2431
2010-12-25T16:58:16Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
border: 1px dashed #2F6FAB;
color: black;
margin-top: 1em;
}
.mw-genshibox pre {
padding: 0;
}
8929f871ecb667d500de6b6f050d445b0ea2c495
2431
2430
2010-12-25T16:51:07Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #C1FFC1;
border: 1px dashed #2F6FAB;
color: black;
}
4e134e5663c3e9624daf0fab261d4b5ef35ef0e4
2430
2429
2010-12-25T16:50:26Z
EXt
1
typo
css
text/css
/* CSS placed here will be applied to all skins */
.mw-genshibox {
background-color: #F2FFF2;
border: 1px dashed #2F6FAB;
color: black;
}
b8a58de2b55f64cc10f25a8fd57326818af3ecc2
2429
2428
2010-12-25T16:47:54Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshibox {
background-color: #F2FFF2;
border: 1px dashed #2F6FAB;
color: black;
}
e1819177c01821a01c8cabcd47a04e9ddef193a4
2428
2427
2010-12-25T16:44:52Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshibox {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
}
b3ed2654a05354442d0914845946b45f1e986609
2427
2426
2010-12-25T16:42:44Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
}
74afa506289c2da4e5c85f639be107c856303fac
2426
2425
2010-12-25T16:41:39Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshi {
background-color: #F9F9F9;
border: 1px dashed #2F6FAB;
color: black;
line-height: 1.1em;
padding: 1em;
}
3fdeff03abd5e1ccd37846e0f39294f2b20b54f3
2425
2424
2010-12-25T16:27:10Z
EXt
1
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshi {
border: 1px dashed #000;
}
1da8bc8a84721f888a0e3eae5ea3ca6efdfbefec
2424
2010-12-25T16:24:55Z
EXt
1
Created page with "/* CSS placed here will be applied to all skins */ .mw-geshi { background: red; }"
css
text/css
/* CSS placed here will be applied to all skins */
.mw-geshi {
background: red;
}
5899f683adafea38fce7edf5be0773e5338180c8
MediaWiki:Monobook.css
8
4
2113
1955
2007-02-19T00:55:38Z
EXt
1
css
text/css
/* <pre> <nowiki> */
/* edit this file to customize the monobook skin for the entire site */
/* pre boxes, lets make them scroll */
pre {
overflow: auto;
}
div.scroll pre{
max-height: 25em;
height: expression(this.scrollHeight > 150 ? "250px" : "auto"); /* IE */
}
table.box {
float: right;
margin-left: 5px;
border:1px solid #aaaaaa;
background-color: white;
padding:5px;
font-size: 85%;
width: 210px;
}
/* </nowiki> </pre>*/
44a8434646439c4e75fbff5732ba3bdebc49ed13
1955
4
2006-07-17T21:09:32Z
EXt
1
css
text/css
/* edit this file to customize the monobook skin for the entire site */
/* pre boxes, lets make them scroll */
pre {
overflow: auto;
}
div.scroll pre{
max-height: 25em;
height: expression(this.scrollHeight > 150 ? "250px" : "auto"); /* IE */
}
9d9dfcf6d4c471cebff85fdb6055b6fb551c994d
4
2006-05-06T09:57:13Z
MediaWiki default
0
css
text/css
/* edit this file to customize the monobook skin for the entire site */
2ea8300bdb20caabbfa93523ae00f79a7bf7e3eb
MediaWiki:Sidebar
8
1572
2670
2639
2012-02-28T13:16:20Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
** Category:Git|Git
*Programming
** Category:linux-dev|Linux tools
** Category:OpenGL|OpenGL
* SEARCH
* TOOLBOX
8dc8df8503ef02c29722fff921f8dbb012317008
2639
2638
2012-01-27T13:08:17Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
*Programming
** Category:linux-dev|Linux tools
** Category:OpenGL|OpenGL
* SEARCH
* TOOLBOX
b75e8bedca4bb7f3e5355e2a072621ebf2867d76
2638
2635
2012-01-27T13:08:05Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
*Programming
** Category:linux-dev|Linux tools (GCC, gdb, automake)
** Category:OpenGL|OpenGL
* SEARCH
* TOOLBOX
6fddb6133c0fe406ba5e1b1433104ec3972bb662
2635
2625
2012-01-27T13:06:08Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
*Programming
** Category:GCC|GCC
** Category:OpenGL|OpenGL
* SEARCH
* TOOLBOX
cd52bfe5fbb119a679dfb2a840e4ec1455564065
2625
2621
2012-01-27T13:02:24Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
*Programming
** Category:OpenGL|OpenGL
* SEARCH
* TOOLBOX
f4e04996c0766890a1f1fd1f996e0363feb92682
2621
2591
2012-01-27T13:00:17Z
EXt
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
*Linux
** Category:Linux|General
** Category:Grub|GRUB
** Category:Netboot|Netboot
** Category:Subversion|Subversion
* SEARCH
* TOOLBOX
007bac0e5f3854567d8cd81ae4bd4b9790fcd040
2591
2012-01-27T12:18:16Z
EXt
1
Created page with "* navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** helppage|help * SEARCH * TOOLBOX"
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** helppage|help
* SEARCH
* TOOLBOX
49cdf82d24a3ca5ba8386fcac06d533df52ebd16
Template:=
10
1502
2420
2010-12-25T15:52:03Z
EXt
1
Created page with "<includeonly>=</includeonly><noinclude>Used to include a '=' sign in templates</noinclude>"
wikitext
text/x-wiki
<includeonly>=</includeonly><noinclude>Used to include a '=' sign in templates</noinclude>
b581143b94bde3ca584aac041843a1a84d0d0479
Template:ATTN
10
1431
2119
2007-02-19T01:18:46Z
EXt
1
wikitext
text/x-wiki
<font style="background: yellow; font-family: monospace;">ATTN: "{{{1}}}"</font>
3ffac347038d17a0cd8127934489a5b20cda7ebc
Template:Article
10
1374
1391
2006-05-07T13:30:02Z
EXt
1
wikitext
text/x-wiki
{| style="font-size: 90%; float:right; border: 1px solid black;"
|-
! style="padding:0 5px; background:#ccf;" | Article
|-
| style="padding:0 5px; background:#edf3fe;" | Author: {{{1}}}
|-
| style="padding:0 5px; background:#fff;" | Date: {{{2}}}
|-
| style="padding:0 5px; background:#edf3fe;" | Category: {{{3}}}
|}
bae3b36c96b4791e45edc1447f9eb4779a1fba31
Template:Boost::Python
10
1430
2115
2114
2007-02-19T01:04:06Z
EXt
1
wikitext
text/x-wiki
<includeonly>[[Category:C/Cpp]][[Category:Boost]][[Category:Python]]
{| align=right style="margin-left: 5px; text-align: center; padding:5px; width: 260px;"
|
{| class=box
|style="text-align: left;"|
''' Boost::Python series '''
* [[Boost::Python: List|List]]
* [[Boost::Python: Dictionary|Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers|Pointer conversion]]
''' Site: '''
[http://www.boost.org/ boost.org] ([http://www.boost.org/libs/python/doc/ Documentation])
|-
| align="right" | [http://sidvind.com/wiki?title=Template:Boost::Python&action=edit [edit]]
|}
|}</includeonly>
6204f37b33be14a77aa3c98ce3cae65ad7f8a898
2114
2007-02-19T00:57:35Z
EXt
1
wikitext
text/x-wiki
<includeonly>[[Category:C/Cpp]][[Category:Boost]][[Category:Python]]
{| align=right style="margin-left: 5px; text-align: center; padding:5px; width: 260px;"
|
{| class=box
|style="text-align: left;"|
== Boost::Python series ==
* [[Boost::Python: List|List]]
* [[Boost::Python: Dictionary|Dictionary]]
* [[Boost::Python: Converting to and from custom class pointers|Pointer conversion]]
''' Site: '''
[http://www.boost.org/ boost.org] ([http://www.boost.org/libs/python/doc/ Documentation])
|-
| align="right" | [http://sidvind.com/wiki?title=Template:Boost::Python&action=edit [edit]]
|}
|}</includeonly>
09560d07719220aa4d660fad52d967570103d9e5
Template:Box code
10
1387
3045
3044
2015-08-08T01:21:57Z
EXt
1
Undo revision 3044 by [[Special:Contributions/EXt|EXt]] ([[User talk:EXt|talk]])
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
{{{2}}}
|}
8ed4d6b3f20b335fcdd9fe1e8bfffa33cf16c9a2
3044
2440
2015-08-08T01:19:20Z
EXt
1
use codebox
wikitext
text/x-wiki
<codebox title="{{{1}}}">
{{{2}}}
</codebox>
2ff1840193a2a658bc5ba5ed893a911008d3512c
2440
2422
2010-12-25T17:26:19Z
EXt
1
Restoring old behaviour
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
{{{2}}}
|}
8ed4d6b3f20b335fcdd9fe1e8bfffa33cf16c9a2
2422
2419
2010-12-25T16:01:39Z
EXt
1
reverting title-parameter
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
{{#tag:syntaxhighlight
|{{{2}}}
|lang={{{lang|cpp}}}
}}
|}
237ffc54da03412c01b52c7fa21512c2e982d2c0
2419
2417
2010-12-25T15:40:33Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{title}}}</font>
|-
| style="font-family: Courier-new;" |
{{#tag:syntaxhighlight
|{{{1}}}
|lang={{{lang|cpp}}}
}}
|}
6804d3590c7a628dd1ab9f207be5d541c571c54d
2417
2416
2010-12-25T13:38:47Z
EXt
1
test 2 using #tag
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{title}}}</font>
|-
| style="font-family: Courier-new;" |
{{#tag:syntaxhighlight
|{{{1}}}}
|lang={{{lang|cpp}}}
}}
|}
75e1dee84bcc0164a9d669f3c72d51abf944ab6d
2416
2415
2010-12-25T13:35:12Z
EXt
1
test using #tag
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
{{#tag:syntaxhighlight|{{{2}}}}}
|}
74de9294d4dccb9fd05993c604afaee1cca35313
2415
2057
2010-12-25T13:27:22Z
EXt
1
Test to see if it is possible to automatically add synax highlighting in code box.
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
<syntaxhighlight line>
{{{2}}}
</syntaxhighlight>
|}
fc95adfbf557c2fa200a8d73d947230c6b68275f
2057
1937
2006-09-24T19:01:37Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888; " | <font size="-1">'''Code:''' {{{1}}}</font>
|-
| style="font-family: Courier-new;" |
{{{2}}}
|}
8ed4d6b3f20b335fcdd9fe1e8bfffa33cf16c9a2
1937
2006-07-14T13:39:16Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888;" | <font size="-1">'''Code:''' {{{1}}}</font>
|-
|
{{{2}}}
|}
eeea10dee51965b9245555304e06c89a14dff0eb
Template:Box file
10
1386
1938
1936
2006-07-14T13:39:42Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #fff2f2; border: solid 1px #ffbfbf;"
| style="background-color: #ffafaf; border-bottom: 1px solid #888;" | <font size="-1">'''File:''' {{{1}}}</font>
|-
|
<div class="scroll">{{{2}}}</div>
|}
cac052a02a42f7e516e39c4997bf705918a9e294
1936
2006-07-14T13:38:37Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0 style="background-color: #f2fff2; border: solid 1px #bfffbf;"
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0; border-bottom: 1px solid #888;" | <font size="-1">'''Code:''' {{{1}}}</font>
|-
|
{{{2}}}
|}
eeea10dee51965b9245555304e06c89a14dff0eb
Template:Box note
10
1390
1947
2006-07-15T10:46:52Z
EXt
1
wikitext
text/x-wiki
{| WIDTH="75%" cellpadding=0 cellspacing=0
| style="background-color: #c1ffc1; border: solid 1px #a0ffa0;" | <font size="-1">'''Note:''' {{{1}}}</font>
|}
75316ab83b2bcb24555b03728f0850fa44304d97
Template:Box warning
10
1391
1948
2006-07-15T10:48:24Z
EXt
1
wikitext
text/x-wiki
{| width="75%" cellpadding=0 cellspacing=0
| style="background-color: #ffc1c1; border: solid 2px #ff7070; padding: 0px 4px;" | <font size="-1">'''Warning:''' {{{1}}}</font>
|}
aa09efa1b6a3236d82825bc9967306dbed0fc465
Template:Filename
10
1388
2965
1939
2015-02-02T11:49:59Z
EXt
1
wikitext
text/x-wiki
<tt style="color: green">{{{1}}}</tt>
6dad4ef037bf1e45a8e05aeb16a62c20fa629fdc
1939
2006-07-14T13:48:12Z
EXt
1
wikitext
text/x-wiki
<font color="green" style="font-family: monospace;">{{{1}}}</font>
0935b3098b2c29a1e783c9ff239f9ae4a6102bbc
Template:Inline code
10
1410
2056
2055
2006-09-24T19:00:15Z
EXt
1
wikitext
text/x-wiki
<span style="font-family: Courier-new;">{{{1}}}</span>
de6e5f10745ecc1d6b00475c5d80b42cb0ddd621
2055
2006-09-24T18:59:38Z
EXt
1
wikitext
text/x-wiki
<span style="font-family: Courier-new;">{{{2}}}</span>
ef64a4623a44430617f69f53b75caa6c41e53a17
Template:Keyword
10
1434
2141
2007-11-19T22:17:39Z
EXt
1
Template to mark a c++ keyword in plain text (same color as the syntax highlighting)
wikitext
text/x-wiki
<span style="color: #a020f0; font-weight: bold;">{{{1}}}</span>
07060300514dad71343efea5a97ddd7f66894cf9
Template:Netboot
10
1569
2679
2577
2012-03-26T22:13:59Z
EXt
1
wikitext
text/x-wiki
<includeonly>[[Category:Linux]][[Category:Netboot]]</includeonly>
{| align=right class=box style="margin-left: 5px; text-align: center; padding:5px; width: 160px;"
|-
! Netboot
|-
| using pxelinux and tftp.
|-
| style="text-align: left;" |
* [[Netboot/Server|Server setup]]
* [[Netboot/Utilities|Utilities]]
* [[Netboot/Ubuntu|Ubuntu]]
* [[Netboot/OpenBSD|OpenBSD]]
* [[Netboot/Windows 7|Windows 7]]
|}
4ec99313fd71b706843ac07a2b6ba145ff6625b9
2577
2012-01-08T01:16:47Z
EXt
1
Created page with "<includeonly>[[Category:Linux]][[Category:Netboot]]</includeonly> {| align=right class=box style="margin-left: 5px; text-align: center; padding:5px; width: 160px;" |- ! Netboot |..."
wikitext
text/x-wiki
<includeonly>[[Category:Linux]][[Category:Netboot]]</includeonly>
{| align=right class=box style="margin-left: 5px; text-align: center; padding:5px; width: 160px;"
|-
! Netboot
|-
| using pxelinux and tftp.
|-
| style="text-align: left;" |
* [[Netboot/Server|Server setup]]
* [[Netboot/Utilities|Utilities]]
* [[Netboot/Ubuntu|Ubuntu]]
* [[Netboot/Windows 7|Windows 7]]
|}
ec21d23fc04e0258bc3f3c4bd4335f4cab7cf9b6
Template:Project
10
1376
1900
1899
2006-05-08T09:49:28Z
EXt
1
wikitext
text/x-wiki
{| style="font-size: 90%; float:right; border: 1px solid black; width:22em;"
|-
! style="padding:0 5px; background:#ccf;" | {{{1}}}
|-
| style="padding:0 5px; background:#edf3fe;" | Credits: {{{2}}}
|-
| style="padding:0 5px; background:#fff;" | Platform: {{{3}}}
|-
| style="padding:0 5px; background:#edf3fe;" | Requirements: {{{4}}}
|-
! style="padding:0 5px; background:#ccf;" | Description
|-
| style="padding:0 5px; background:#edf3fe;" | {{{5}}}
|}
62b63146bbf4a802bd6ff5722a89ad7ee33147ce
1899
2006-05-08T09:41:32Z
EXt
1
wikitext
text/x-wiki
{| style="font-size: 90%; float:right; border: 1px solid black;"
|-
! style="padding:0 5px; background:#ccf;" | Project
|-
| style="padding:0 5px; background:#edf3fe;" | Credits: {{{1}}}
|-
| style="padding:0 5px; background:#fff;" | Platform: {{{2}}}
|-
| style="padding:0 5px; background:#edf3fe;" | Software: {{{3}}}
|-
| style="padding:0 5px; background:#fff;" | Requirements: {{{4}}}
|}
0efe1f0379470a033ea939086e21b0764c164eec
Category:Gcc
14
1587
2657
2012-02-06T16:23:24Z
EXt
1
Created page with "[[Category:Linux-dev]]"
wikitext
text/x-wiki
[[Category:Linux-dev]]
58e37a2729c7683e795fa088a17e87573e1b409d
Category:Gentoo
14
1834
3049
2015-08-09T12:12:11Z
EXt
1
Created page with "[[Category:Linux]]"
wikitext
text/x-wiki
[[Category:Linux]]
8e95005e30297eac030159b0a92312132e9ec5cd
Category:Grub
14
1575
2608
2012-01-27T12:51:06Z
EXt
1
Created page with "[[Category:Linux]]"
wikitext
text/x-wiki
[[Category:Linux]]
8e95005e30297eac030159b0a92312132e9ec5cd
Category:Linux
14
1674
2775
2013-06-20T17:03:03Z
EXt
1
Created page with "Linux related articles."
wikitext
text/x-wiki
Linux related articles.
547559d371b308b5d800db24c837c6a3f71a9a5a
Category:Mount
14
1581
2634
2012-01-27T13:05:07Z
EXt
1
Created page with "[[Category:Linux]]"
wikitext
text/x-wiki
[[Category:Linux]]
8e95005e30297eac030159b0a92312132e9ec5cd
Category:Netboot
14
1574
2595
2012-01-27T12:21:12Z
EXt
1
Created page with "[[Category:Linux]]"
wikitext
text/x-wiki
[[Category:Linux]]
8e95005e30297eac030159b0a92312132e9ec5cd
Category:Subversion
14
1573
2594
2012-01-27T12:20:11Z
EXt
1
Created page with "[[Category:Linux]] [[Category:VCS]]"
wikitext
text/x-wiki
[[Category:Linux]]
[[Category:VCS]]
69980f0156dd6718edccf2f8e7f7d2ff20200852